Re: [PATCH 3/3] fat: remove unneeded compare condition for __fat_write_inode

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

 



Namjae Jeon <linkinjeon@xxxxxxxxx> writes:

> In calling of __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL),
> expression "wbc->sync_mode == WB_SYNC_ALL" will always be equivalent to value
> of wbc->sync_mode. So, remove this additional compare condition from function
> arguments.

Current style is better. I.e. easy to add new sync mode.

> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxx>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
> ---
>  fs/fat/inode.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 7b186a5..aa0138b 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -678,7 +678,7 @@ static int fat_write_inode(struct inode *inode, struct writeback_control *wbc)
>  		err = fat_clusters_flush(sb);
>  		mutex_unlock(&MSDOS_SB(sb)->s_lock);
>  	} else
> -		err = __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
> +		err = __fat_write_inode(inode, wbc->sync_mode);
>  
>  	return err;
>  }

-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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