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>
This commit is contained in:
Andreas Gruenbacher 2021-07-28 07:47:34 -05:00 committed by Al Viro
parent 7bb698f09b
commit d75b9fa053
1 changed files with 2 additions and 2 deletions

View File

@ -1985,8 +1985,8 @@ static int gfs2_setattr(struct user_namespace *mnt_userns,
if (error)
goto out;
error = -EPERM;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
error = may_setattr(&init_user_ns, inode, attr->ia_valid);
if (error)
goto error;
error = setattr_prepare(&init_user_ns, dentry, attr);