[PATCH v2] xfs: Check the return value of xfs_trans_get_buf()
Chandra Seetharaman
sekharan at us.ibm.com
Tue Sep 20 13:05:54 CDT 2011
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
>
More information about the xfs
mailing list