diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2021-07-28 15:47:34 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-08-13 07:41:05 +0300 |
commit | d75b9fa053e4cd278281386d860c26fdbfbe9d03 (patch) | |
tree | befab30b224cb9b08204d883bd21469869ac76d2 /fs/gfs2/inode.c | |
parent | 7bb698f09bdd01fbb6d48c14bb1dde556dc1af00 (diff) | |
download | linux-d75b9fa053e4cd278281386d860c26fdbfbe9d03.tar.xz |
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>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 6e15434b23ac..3130f85d2b3f 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -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); |