RE: [PATCH] xfs: Abort intent log item in xfs_iflush() upon error to get buf

Shyam Kaushik
2016-04-13T04:02:31Z

Thanks Dave.

You are right that xfs_trans_read_buf_map() is initializing it but
xfs_imap_to_bp() being in the middle spoils it by passing its own local
bp.

--Shyam

-----Original Message-----
From: Dave Chinner [mailto:david@fromorbit.com]
Sent: 13 April 2016 02:46
To: Shyam Kaushik
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: Abort intent log item in xfs_iflush() upon error
to get buf

On Tue, Apr 12, 2016 at 11:10:13PM +0530, Shyam Kaushik wrote:
> Hi Dave,
>
> Your patch needs a minor correction.
>
> At start of xfs_iflush() either we must initialize "bp = NULL" or else
> xfs_imap_to_bp() when it hits an error need to set "*bpp = NULL".
> Otherwise with your patch we are having an uninitialized bp that
> corrupt_out is trying to do xfs_buf_relse().

Ok, I'll check that - I thought that xfs_trans_buf_read_map() was
initialising it to zero appropriately, but obviously I missed
something.

Thanks for testing!