Re: [PATCH] percpu-rwsem: remove the unused parameter 'read'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								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
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux