Commit d75b9fa0 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Al Viro

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: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7bb698f0
...@@ -1985,8 +1985,8 @@ static int gfs2_setattr(struct user_namespace *mnt_userns, ...@@ -1985,8 +1985,8 @@ static int gfs2_setattr(struct user_namespace *mnt_userns,
if (error) if (error)
goto out; goto out;
error = -EPERM; error = may_setattr(&init_user_ns, inode, attr->ia_valid);
if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) if (error)
goto error; goto error;
error = setattr_prepare(&init_user_ns, dentry, attr); error = setattr_prepare(&init_user_ns, dentry, attr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment