xfs
[Top] [All Lists]

Re: [PATCH] Introduce xfs_bmap_add_attrfork_trans.

To: Niv Sardi <xaiki@xxxxxxx>
Subject: Re: [PATCH] Introduce xfs_bmap_add_attrfork_trans.
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 23 Jul 2008 03:58:26 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1215675545-2707-4-git-send-email-xaiki@xxxxxxx>
References: <1214196150-5427-1-git-send-email-xaiki@xxxxxxx> <1215675545-2707-1-git-send-email-xaiki@xxxxxxx> <1215675545-2707-2-git-send-email-xaiki@xxxxxxx> <1215675545-2707-3-git-send-email-xaiki@xxxxxxx> <1215675545-2707-4-git-send-email-xaiki@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
> +error0:
> +     xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
> +     ASSERT(ip->i_df.if_ext_max ==
> +            XFS_IFORK_DSIZE(ip) / (uint)sizeof(xfs_bmbt_rec_t));
> +     return error;

I think the transaction cancelling should be done by the caller.  The
callers will surely have cases where they have to cancel the transaction
already, and it's also more symmetric.

> +     VN_HOLD(XFS_ITOV(ip));

Please just use

        IHOLD(ip);

instead of the above construct.

Otherwise this looks fine and like another candidate to commit already.


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