summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-01-20 13:06:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-01-20 13:06:28 -0800
commit1851bccf608a28ac5ec9410764dda9a46828213b (patch)
tree6079605282fd9a1d6cf8abc05a59dd6054fabcc0 /fs
parentb971424b6e3cbea5c017061fedda6a5f74e142cd (diff)
parent7c9d9223802fbed4dee1ae301661bf346964c9d2 (diff)
Merge tag 'gfs2-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 updates from Andreas Gruenbacher: - In the quota code, to avoid spurious audit messages, don't call capable() when quotas are off - When changing the 'j' flag of an inode, truncate the inode address space to avoid mixing "buffer head" and "iomap" pages * tag 'gfs2-for-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag gfs2: reorder capability check last
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/file.c1
-rw-r--r--fs/gfs2/quota.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 1e73cf87ff88..c9bb3be21d2b 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -251,6 +251,7 @@ static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask)
error = filemap_fdatawait(inode->i_mapping);
if (error)
goto out;
+ truncate_inode_pages(inode->i_mapping, 0);
if (new_flags & GFS2_DIF_JDATA)
gfs2_ordered_del_inode(ip);
}
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h
index f462d9cb3087..988f38dc5b2c 100644
--- a/fs/gfs2/quota.h
+++ b/fs/gfs2/quota.h
@@ -44,8 +44,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
int ret;
ap->allowed = UINT_MAX; /* Assume we are permitted a whole lot */
- if (capable(CAP_SYS_RESOURCE) ||
- sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
+ if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ||
+ capable(CAP_SYS_RESOURCE))
return 0;
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
if (ret)