Skip to content

Commit d75b9fa

Browse files
Andreas GruenbacherAl Viro
authored andcommitted
gfs2: Switch to may_setattr in gfs2_setattr
The permission check in gfs2_setattr is an old and outdated version of may_setattr(). Switch to the updated version. Fixes fstest generic/079. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 7bb698f commit d75b9fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/gfs2/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,8 +1985,8 @@ static int gfs2_setattr(struct user_namespace *mnt_userns,
19851985
if (error)
19861986
goto out;
19871987

1988-
error = -EPERM;
1989-
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
1988+
error = may_setattr(&init_user_ns, inode, attr->ia_valid);
1989+
if (error)
19901990
goto error;
19911991

19921992
error = setattr_prepare(&init_user_ns, dentry, attr);

0 commit comments

Comments
 (0)