Skip to contentSkip to conversation

f2fs: fix a wrong condition in f2fs_skip_inode_update

PATCH In review Junling Zheng 2 participants 2 messages Mar 29, 2018 – Apr 2, 2018 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: fix a wrong condition in f2fs_skip_inode_update

Fix commit 97dd26ad8347 (f2fs: fix wrong AUTO_RECOVER condition). We should use ~PAGE_MASK to determine whether i_size is aligned to the f2fs's block size or not.

---
 fs/f2fs/f2fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/f2fs.h +1 -1
index ae69dc358401..8c159785f6b5 100644
@@ -2469,7 +2469,7 @@ static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync)
 	}
 	if (!is_inode_flag_set(inode, FI_AUTO_RECOVER) ||
 			file_keep_isize(inode) ||
-			i_size_read(inode) & PAGE_MASK)
+			i_size_read(inode) & ~PAGE_MASK)
 		return false;
 
 	down_read(&F2FS_I(inode)->i_sem);
Signature · 6 lines
2.16.2


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Junling Zheng

Fix commit 97dd26ad8347 (f2fs: fix wrong AUTO_RECOVER condition). We should use ~PAGE_MASK to determine whether i_size is aligned to the f2fs's block size or not.

Thanks,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot