f2fs: fix to dirty inode for i_mode recovery
authorChao Yu <yuchao0@huawei.com>
Sat, 23 Feb 2019 01:48:27 +0000 (09:48 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 13 Mar 2019 01:59:18 +0000 (18:59 -0700)
commitca597bddedd94906cd761d8be6a3ad21292725de
tree974be67f675dd86dd3d598f46cdd46d222e30c2b
parent428e3bcf07696ff252b7ff3ff7711c2b9bbdb908
f2fs: fix to dirty inode for i_mode recovery

As Seulbae Kim reported in bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=202637

We didn't recover permission field correctly after sudden power-cut,
the reason is in setattr we didn't add inode into global dirty list
once i_mode is changed, so latter checkpoint triggered by fsync will
not flush last i_mode into disk, result in this problem, fix it.

Reported-by: Seulbae Kim <seulbae@gatech.edu>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c