Message ID | 20240802091901.2546797-1-w@laoqinren.net (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | percpu-rwsem: remove the unused parameter 'read' | expand |
On Fri 02-08-24 17:19:01, Wang Long wrote: > In the function percpu_rwsem_release, the parameter `read` > is unused, so remove it. > > Signed-off-by: Wang Long <w@laoqinren.net> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > 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 >
On Fri, 02 Aug 2024 17:19:01 +0800, Wang Long wrote: > In the function percpu_rwsem_release, the parameter `read` > is unused, so remove it. > > Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/1] percpu-rwsem: remove the unused parameter 'read' https://git.kernel.org/vfs/vfs/c/31eaea29457d
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); }
In the function percpu_rwsem_release, the parameter `read` is unused, so remove it. Signed-off-by: Wang Long <w@laoqinren.net> --- fs/super.c | 2 +- include/linux/fs.h | 2 +- include/linux/percpu-rwsem.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)