Re: [PATCH] mbcache: change setting entry->e_reusable for more readable code

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

 



On Thu, Nov 15, 2018 at 02:42:33PM +0800, Chengguang Xu wrote:
> Instead of directly setting entry->e_reusable to parameter reusable,
> cheek the bool value for more readable code.
> 
> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
> ---
>  fs/mbcache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/mbcache.c b/fs/mbcache.c
> index 081ccf0caee3..39ec9fd8bacf 100644
> --- a/fs/mbcache.c
> +++ b/fs/mbcache.c
> @@ -93,7 +93,7 @@ int mb_cache_entry_create(struct mb_cache *cache, gfp_t mask, u32 key,
>  	atomic_set(&entry->e_refcnt, 1);
>  	entry->e_key = key;
>  	entry->e_value = value;
> -	entry->e_reusable = reusable;
> +	entry->e_reusable = reusable ? 1 : 0;

Huh?  How is that more readable?



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

  Powered by Linux