]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
f2fs: synchronize atomic write aborts
authorDaeho Jeong <daehojeong@google.com>
Thu, 9 Feb 2023 18:18:19 +0000 (10:18 -0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:50 +0000 (16:47 +0100)
commit96ed6a9c25463defc0c135c68596cdc952bea3da
tree73fe1e359c6fd674829f48909e937cdeb12ba1f6
parent678078944b37e36abe8e0b12f7f3180a2a29fdd7
f2fs: synchronize atomic write aborts

BugLink: https://bugs.launchpad.net/bugs/2011430
[ Upstream commit a46bebd502fe1a3bd1d22f64cedd93e7e7702693 ]

To fix a race condition between atomic write aborts, I use the inode
lock and make COW inode to be re-usable thoroughout the whole
atomic file inode lifetime.

Reported-by: syzbot+823000d23b3400619f7c@syzkaller.appspotmail.com
Fixes: 3db1de0e582c ("f2fs: change the current atomic write way")
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/file.c
fs/f2fs/inode.c
fs/f2fs/segment.c
fs/f2fs/super.c