f2fs: enhance to update i_mode and acl atomically in f2fs_setattr()
authorChao Yu <yuchao0@huawei.com>
Fri, 25 Dec 2020 08:52:27 +0000 (16:52 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 27 Jan 2021 23:20:00 +0000 (15:20 -0800)
commit17232e830afb800acdcc22ae8980bf9d330393ef
tree34ea7dfc5aef6aeadfc4dd47e2819de6eec82a33
parenta28d9aa1a2c7c774c38f2da1a662434bc29cb98e
f2fs: enhance to update i_mode and acl atomically in f2fs_setattr()

Previously, in f2fs_setattr(), we don't update S_ISUID|S_ISGID|S_ISVTX
bits with S_IRWXUGO bits and acl entries atomically, so in error path,
chmod() may partially success, this patch enhances to make chmod() flow
being atomical.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/acl.c
fs/f2fs/file.c
fs/f2fs/xattr.c