[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240802091901.2546797-1-w@laoqinren.net>
Date: Fri, 2 Aug 2024 17:19:01 +0800
From: Wang Long <w@...qinren.net>
To: viro@...iv.linux.org.uk,
brauner@...nel.org,
jack@...e.cz,
tj@...nel.org,
cl@...ux.com,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: Wang Long <w@...qinren.net>
Subject: [PATCH] percpu-rwsem: remove the unused parameter 'read'
In the function percpu_rwsem_release, the parameter `read`
is unused, so remove it.
Signed-off-by: Wang Long <w@...qinren.net>
---
fs/super.c | 2 +-
include/linux/fs.h | 2 +-
include/linux/percpu-rwsem.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/super.c b/fs/super.c
index 38d72a3cf6fc..216c0d2b7927 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1905,7 +1905,7 @@ static void lockdep_sb_freeze_release(struct super_block *sb)
int level;
for (level = SB_FREEZE_LEVELS - 1; level >= 0; level--)
- percpu_rwsem_release(sb->s_writers.rw_sem + level, 0, _THIS_IP_);
+ percpu_rwsem_release(sb->s_writers.rw_sem + level, _THIS_IP_);
}
/*
diff --git a/include/linux/fs.h b/include/linux/fs.h
index fd34b5755c0b..d63809e7ea54 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1683,7 +1683,7 @@ static inline bool __sb_start_write_trylock(struct super_block *sb, int level)
#define __sb_writers_acquired(sb, lev) \
percpu_rwsem_acquire(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
#define __sb_writers_release(sb, lev) \
- percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
+ percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], _THIS_IP_)
/**
* __sb_write_started - check if sb freeze level is held
diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h
index 36b942b67b7d..c012df33a9f0 100644
--- a/include/linux/percpu-rwsem.h
+++ b/include/linux/percpu-rwsem.h
@@ -145,7 +145,7 @@ extern void percpu_free_rwsem(struct percpu_rw_semaphore *);
#define percpu_rwsem_assert_held(sem) lockdep_assert_held(sem)
static inline void percpu_rwsem_release(struct percpu_rw_semaphore *sem,
- bool read, unsigned long ip)
+ unsigned long ip)
{
lock_release(&sem->dep_map, ip);
}
--
2.33.0
Powered by blists - more mailing lists