author: Weichao Guo <guoweichao@oppo.com> 2020-12-14 11:54:53 +0800
committer: Jaegeuk Kim <jaegeuk@kernel.org> 2021-01-27 15:20:00 -0800
commit: a28d9aa1a2c7c774c38f2da1a662434bc29cb98e
parent: 36218b81f094648d929994399eb6eb5c97b991e5
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index f585545277d7..eced14882fc1 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -850,6 +850,7 @@ static void __setattr_copy(struct inode *inode, const struct iattr *attr)
if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
mode &= ~S_ISGID;
+ inode->i_mode = (inode->i_mode & S_IRWXUGO) | (mode & ~S_IRWXUGO);
set_acl_inode(inode, mode);
}
}