Commit d0efc9e4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xfs-fixes-6.17-rc2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:

 - Fix an assert trigger introduced during the merge window

 - Prevent atomic writes to be used with DAX

 - Prevent users from using the max_atomic_write mount option without
   reflink, as atomic writes > 1block are not supported without reflink

 - Fix a null-pointer-deref in a tracepoint

* tag 'xfs-fixes-6.17-rc2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: split xfs_zone_record_blocks
  xfs: fix scrub trace with null pointer in quotacheck
  xfs: reject max_atomic_write mount option for no reflink
  xfs: disallow atomic writes on DAX
  fs/dax: Reject IOCB_ATOMIC in dax_iomap_rw()
  xfs: remove XFS_IBULK_SAME_AG
  xfs: fully decouple XFS_IBULK* flags from XFS_IWALK* flags
  xfs: fix frozen file system assert in xfs_trans_alloc
parents ee94b00c f76823e3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1743,6 +1743,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
	loff_t done = 0;
	int ret;

	if (WARN_ON_ONCE(iocb->ki_flags & IOCB_ATOMIC))
		return -EIO;

	if (!iomi.len)
		return 0;

+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ DECLARE_EVENT_CLASS(xchk_dqiter_class,
		__field(xfs_exntst_t, state)
	),
	TP_fast_assign(
		__entry->dev = cursor->sc->ip->i_mount->m_super->s_dev;
		__entry->dev = cursor->sc->mp->m_super->s_dev;
		__entry->dqtype = cursor->dqtype;
		__entry->ino = cursor->quota_ip->i_ino;
		__entry->cur_id = cursor->id;
+3 −3
Original line number Diff line number Diff line
@@ -1101,9 +1101,6 @@ xfs_file_write_iter(
	if (xfs_is_shutdown(ip->i_mount))
		return -EIO;

	if (IS_DAX(inode))
		return xfs_file_dax_write(iocb, from);

	if (iocb->ki_flags & IOCB_ATOMIC) {
		if (ocount < xfs_get_atomic_write_min(ip))
			return -EINVAL;
@@ -1116,6 +1113,9 @@ xfs_file_write_iter(
			return ret;
	}

	if (IS_DAX(inode))
		return xfs_file_dax_write(iocb, from);

	if (iocb->ki_flags & IOCB_DIRECT) {
		/*
		 * Allow a directio write to fall back to a buffered
+11 −0
Original line number Diff line number Diff line
@@ -358,9 +358,20 @@ static inline bool xfs_inode_has_bigrtalloc(const struct xfs_inode *ip)

static inline bool xfs_inode_can_hw_atomic_write(const struct xfs_inode *ip)
{
	if (IS_DAX(VFS_IC(ip)))
		return false;

	return xfs_inode_buftarg(ip)->bt_awu_max > 0;
}

static inline bool xfs_inode_can_sw_atomic_write(const struct xfs_inode *ip)
{
	if (IS_DAX(VFS_IC(ip)))
		return false;

	return xfs_can_sw_atomic_write(ip->i_mount);
}

/*
 * In-core inode flags.
 */
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ xfs_bulk_ireq_setup(
		else if (XFS_INO_TO_AGNO(mp, breq->startino) < hdr->agno)
			return -EINVAL;

		breq->flags |= XFS_IBULK_SAME_AG;
		breq->iwalk_flags |= XFS_IWALK_SAME_AG;

		/* Asking for an inode past the end of the AG?  We're done! */
		if (XFS_INO_TO_AGNO(mp, breq->startino) > hdr->agno)
Loading