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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux