| To: | Chandra Seetharaman <sekharan@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v2] xfs: Check the return value of xfs_trans_get_buf() |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Tue, 20 Sep 2011 11:00:29 -0400 |
| Cc: | XFS Mailing List <xfs@xxxxxxxxxxx>, Alex Elder <aelder@xxxxxxx> |
| In-reply-to: | <1316527015.9298.60.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| References: | <1316527015.9298.60.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [patch 3/4] mm: filemap: pass __GFP_WRITE from grab_cache_page_write_begin(), Christoph Hellwig |
|---|---|
| Next by Date: | Re: [patch 1/4] mm: exclude reserved pages from dirtyable memory, Rik van Riel |
| Previous by Thread: | [PATCH v2] xfs: Check the return value of xfs_trans_get_buf(), Chandra Seetharaman |
| Next by Thread: | Re: [PATCH v2] xfs: Check the return value of xfs_trans_get_buf(), Chandra Seetharaman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |