]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 2 Jul 2019 10:07:53 +0000 (12:07 +0200)
commitdb06e4ab8d813c79f5e5ea4bd6f0f2256ae24a8f
treeb62634d263475140a22d2f732a1f48b5a313cca6
parenta0fa23996415b0b2dd0361acd72635fe553b7e01
f2fs: fix to dirty inode for i_mode recovery

BugLink: https://bugs.launchpad.net/bugs/1830906
[ Upstream commit ca597bddedd94906cd761d8be6a3ad21292725de ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/f2fs/file.c