Function notify_change already performs the necessary permission checks for immutable and append-only files, so there is no need to check again in setattr inode operations. What's worse, the check in gfs2_setattr prevents setting the atime and mtime of append-only files to the current time, which is supposed to be permitted.
Fixes xfstest generic/079. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/inode.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 4749a6b8e4dd..05284dd2ae6c 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1940,10 +1940,6 @@ static int gfs2_setattr(struct dentry *dentry, struct iattr *attr) if (error) return error; - error = -EPERM; - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) - goto out; - error = setattr_prepare(dentry, attr); if (error) goto out; -- 2.13.5