xfs
[Top] [All Lists]

Re: [PATCH v3] xfs: fix unlock in xfs_bmap_add_attrfork

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH v3] xfs: fix unlock in xfs_bmap_add_attrfork
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Thu, 07 Nov 2013 08:09:39 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131107134725.690440645@xxxxxxx>
References: <20131107134725.690440645@xxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 11/07/13 07:47, Mark Tinguely wrote:
xfs_trans_ijoin() activates the inode in a transaction and
also can specify which lock to free when the transaction is
committed or canceled.

xfs_bmap_add_attrfork adds the XFS_ILOCK_EXCL flag when calling
xfs_trans_ijoin(). This patch does not add the lock removal in
the transaction and manually removes the lock.

While here, clean up the goto names.

Signed-off-by: Mark Tinguely<tinguely@xxxxxxx>
---
v3
    fix the trans_trans_commit return path.
v2
    remove the lock from the transaction.
    adjust the cancel_flags.

  fs/xfs/xfs_bmap.c |   38 +++++++++++++++++++++-----------------
  1 file changed, 21 insertions(+), 17 deletions(-)

Index: b/fs/xfs/xfs_bmap.c
===================================================================


...


                /*
                 * For inodes coming from pre-6.2 filesystems.
@@ -1170,7 +1172,7 @@ xfs_bmap_add_attrfork(
        ASSERT(ip->i_d.di_anextents == 0);

        xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
-       xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
+       xfs_trans_log_inode(tp, ip, 0);

Auugh! poison, wooden stake, behead and then burn this patch.

sorry, don't know how these entries were changed wrong.

--Mark

<Prev in Thread] Current Thread [Next in Thread>