From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 3/2] xfs: fix double ijoin in xfs_reflink_clear_inode_flag()
Date: Wed, 7 Mar 2018 20:19:42 +1100 [thread overview]
Message-ID: <20180307091942.GN18129@dastard> (raw)
In-Reply-To: <20180307091020.6186-1-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Another assert failure:
XFS: Assertion failed: !(lip->li_flags & XFS_LI_TRANS), file: fs/xfs/xfs_trans.c, line: 740
....
xfs_trans_add_item+0xcc/0xe0
xfs_reflink_clear_inode_flag+0x53/0x120
xfs_reflink_try_clear_inode_flag+0x5b/0xa0
? filemap_write_and_wait+0x4f/0x70
xfs_reflink_unshare+0x18e/0x19d
xfs_file_fallocate+0x241/0x310
? selinux_file_permission+0xd4/0x140
vfs_fallocate+0x13d/0x260
SyS_fallocate+0x43/0x80
Another fix.
Signed-Off-By: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_reflink.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index 6225d1ea3fdb..5cf60a042e8f 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -1554,7 +1554,12 @@ xfs_reflink_inode_has_shared_extents(
return 0;
}
-/* Clear the inode reflink flag if there are no shared extents. */
+/*
+ * Clear the inode reflink flag if there are no shared extents.
+ *
+ * The caller is responsible for joining the inode to the transaction passed in.
+ * The inode will be joined to the transaction that is returned to the caller.
+ */
int
xfs_reflink_clear_inode_flag(
struct xfs_inode *ip,
@@ -1573,7 +1578,6 @@ xfs_reflink_clear_inode_flag(
* We didn't find any shared blocks so turn off the reflink flag.
* First, get rid of any leftover CoW mappings.
*/
- xfs_trans_ijoin(*tpp, ip, 0);
error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, NULLFILEOFF, true);
if (error)
return error;
next prev parent reply other threads:[~2018-03-07 9:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 9:10 [PATCH 0/2] xfs: fix transaction joining problems Dave Chinner
2018-03-07 9:10 ` [PATCH 1/2] xfs: fix double ijoin in xfs_inactive_symlink_rmt() Dave Chinner
2018-03-09 18:34 ` Darrick J. Wong
2018-03-07 9:10 ` [PATCH 2/2] xfs: fix double ijoin in xfs_reflink_cancel_cow_range Dave Chinner
2018-03-07 13:17 ` Christoph Hellwig
2018-03-07 21:07 ` Dave Chinner
2018-03-08 8:17 ` Christoph Hellwig
2018-03-09 18:43 ` Darrick J. Wong
2018-03-10 0:48 ` Dave Chinner
2018-03-07 9:19 ` Dave Chinner [this message]
2018-03-09 18:39 ` [PATCH 3/2] xfs: fix double ijoin in xfs_reflink_clear_inode_flag() Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180307091942.GN18129@dastard \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).