Commit 1851bccf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents b971424b 7c9d9223
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}
+2 −2
Original line number Diff line number Diff line
@@ -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)