Skip to content

Commit 1851bcc

Browse files
committed
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
2 parents b971424 + 7c9d922 commit 1851bcc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fs/gfs2/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask)
251251
error = filemap_fdatawait(inode->i_mapping);
252252
if (error)
253253
goto out;
254+
truncate_inode_pages(inode->i_mapping, 0);
254255
if (new_flags & GFS2_DIF_JDATA)
255256
gfs2_ordered_del_inode(ip);
256257
}

fs/gfs2/quota.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
4444
int ret;
4545

4646
ap->allowed = UINT_MAX; /* Assume we are permitted a whole lot */
47-
if (capable(CAP_SYS_RESOURCE) ||
48-
sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
47+
if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ||
48+
capable(CAP_SYS_RESOURCE))
4949
return 0;
5050
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
5151
if (ret)

0 commit comments

Comments
 (0)