From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p8KF0Xnp066731 for ; Tue, 20 Sep 2011 10:00:33 -0500 Date: Tue, 20 Sep 2011 11:00:29 -0400 From: Christoph Hellwig Subject: Re: [PATCH v2] xfs: Check the return value of xfs_trans_get_buf() Message-ID: <20110920150029.GA5239@infradead.org> References: <1316527015.9298.60.camel@chandra-lucid.austin.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1316527015.9298.60.camel@chandra-lucid.austin.ibm.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Chandra Seetharaman Cc: Alex Elder , XFS Mailing List 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. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs