fat: remove unneeded compare condition for __fat_write_inode
Subsystems (2)
PATCH 3/3 fat: remove unneeded compare condition for __fat_write_inode
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.
Signed-off-by Namjae Jeon <[email protected]>
Signed-off-by Amit Sahrawat <[email protected]>
--- fs/fat/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fat/inode.c +1 -1
@@ -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; }
Signature · 1 line
1.7.9.5
OGAWA Hirofumi
maintainerQuoted 4 lines · Namjae Jeon
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 ofwbc->sync_mode. So, remove this additional compare condition from function arguments.
Current style is better. I.e. easy to add new sync mode.
Quoted 19 lines
Signed-off-by Namjae Jeon <[email protected]>Signed-off-by Amit Sahrawat <[email protected]>--- fs/fat/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fat/inode.c +1
-1@@ -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; }
Signature · 1 line
OGAWA Hirofumi <[email protected]>