summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-09-09 22:45:26 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-09 22:45:26 +0300
commit7b871c7713d1eafc3a614883bbdf68ab1dffa883 (patch)
tree942e920ec617dbd23fafe1a368f2ec69203d152e /fs/gfs2
parente2e694b9e6f3ec7deeb233b6b0fe20b6a47b304b (diff)
parentd75b9fa053e4cd278281386d860c26fdbfbe9d03 (diff)
downloadlinux-7b871c7713d1eafc3a614883bbdf68ab1dffa883.tar.xz
Merge branch 'work.gfs2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull gfs2 setattr updates from Al Viro: "Make it possible for filesystems to use a generic 'may_setattr()' and switch gfs2 to using it" * 'work.gfs2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: gfs2: Switch to may_setattr in gfs2_setattr fs: Move notify_change permission checks into may_setattr
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/inode.c4
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);