f2fs: fix out-of-repair __setattr_copy()
__setattr_copy() was copied from setattr_copy() in fs/attr.c, there is two missing patches doesn't cover this inner function, fix it. Commit7fa294c899
("userns: Allow chown and setgid preservation") Commit23adbe12ef
("fs,userns: Change inode_capable to capable_wrt_inode_uidgid") Fixes:fbfa2cc58d
("f2fs: add file operations") Cc: stable@vger.kernel.org Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Родитель
0953fe864c
Коммит
2562515f0a
|
@ -851,7 +851,8 @@ static void __setattr_copy(struct inode *inode, const struct iattr *attr)
|
||||||
if (ia_valid & ATTR_MODE) {
|
if (ia_valid & ATTR_MODE) {
|
||||||
umode_t mode = attr->ia_mode;
|
umode_t mode = attr->ia_mode;
|
||||||
|
|
||||||
if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
|
if (!in_group_p(inode->i_gid) &&
|
||||||
|
!capable_wrt_inode_uidgid(inode, CAP_FSETID))
|
||||||
mode &= ~S_ISGID;
|
mode &= ~S_ISGID;
|
||||||
set_acl_inode(inode, mode);
|
set_acl_inode(inode, mode);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче