xfs
[Top] [All Lists]

Re: [PATCH v2] xfs: Check the return value of xfs_trans_get_buf()

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2] xfs: Check the return value of xfs_trans_get_buf()
From: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Date: Tue, 20 Sep 2011 13:05:54 -0500
Cc: XFS Mailing List <xfs@xxxxxxxxxxx>, Alex Elder <aelder@xxxxxxx>
In-reply-to: <20110920150029.GA5239@xxxxxxxxxxxxx>
Organization: IBM
References: <1316527015.9298.60.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110920150029.GA5239@xxxxxxxxxxxxx>
Reply-to: sekharan@xxxxxxxxxx
On Tue, 2011-09-20 at 11:00 -0400, Christoph Hellwig wrote:
> On Tue, Sep 20, 2011 at 08:56:55AM -0500, Chandra Seetharaman wrote:
> > --- a/fs/xfs/xfs_attr_leaf.c
> > +++ b/fs/xfs/xfs_attr_leaf.c
> > @@ -2948,6 +2948,8 @@ xfs_attr_leaf_freextent(xfs_trans_t **trans, 
> > xfs_inode_t *dp,
> >                     bp = xfs_trans_get_buf(*trans,
> >                                     dp->i_mount->m_ddev_targp,
> >                                     dblkno, dblkcnt, XBF_LOCK);
> > +                   if (!bp)
> > +                           return ENOMEM;
> >                     xfs_trans_binval(*trans, bp);
> 
> xfs_trans_binval only really does anything if the buffer was in memory.
> 
> We have a few callers using that patterm, and I think they should simply
> switch to not reading the buffer in if it's not there yet, e.g.
> using something like an xfs_trans_incore.

Hi Christoph,

I do not understand. Can you elaborate on what needs to be done.

Thanks

Chandra
> 


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