linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix a wrong condition in f2fs_skip_inode_update
@ 2018-03-29 11:27 Junling Zheng
  2018-04-02 10:27 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Junling Zheng @ 2018-03-29 11:27 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

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.

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
---
 fs/f2fs/f2fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index ae69dc358401..8c159785f6b5 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -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);
-- 
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: fix a wrong condition in f2fs_skip_inode_update
  2018-03-29 11:27 [PATCH] f2fs: fix a wrong condition in f2fs_skip_inode_update Junling Zheng
@ 2018-04-02 10:27 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-04-02 10:27 UTC (permalink / raw)
  To: Junling Zheng, jaegeuk; +Cc: linux-f2fs-devel

On 2018/3/29 19:27, Junling Zheng wrote:
> 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.
> 
> Signed-off-by: Junling Zheng <zhengjunling@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-02 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-29 11:27 [PATCH] f2fs: fix a wrong condition in f2fs_skip_inode_update Junling Zheng
2018-04-02 10:27 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).