From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB525LAG023763 for ; Thu, 4 Dec 2008 20:05:21 -0600 Message-ID: <49388C74.9090605@sgi.com> Date: Fri, 05 Dec 2008 13:05:40 +1100 From: Lachlan McIlroy MIME-Version: 1.0 Subject: Re: [PATCH] Check return value of xfs_buf_get_noaddr() References: <49376D11.4010507@sgi.com> <4937F70E.4060600@sandeen.net> In-Reply-To: <4937F70E.4060600@sandeen.net> Reply-To: lachlan@sgi.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: Eric Sandeen Cc: xfs-oss Eric Sandeen wrote: > Lachlan McIlroy wrote: >> We check the return value of all other calls to xfs_buf_get_noaddr(). >> Make sense to do it here too. >> >> --- a/fs/xfs/xfs_vnodeops.c >> +++ b/fs/xfs/xfs_vnodeops.c >> @@ -3034,6 +3034,8 @@ xfs_zero_remaining_bytes( >> bp = xfs_buf_get_noaddr(mp->m_sb.sb_blocksize, >> XFS_IS_REALTIME_INODE(ip) ? >> mp->m_rtdev_targp : mp->m_ddev_targp); >> + if (!bp) >> + return ENOMEM; > > Maybe > > + return XFS_ERROR(ENOMEM); Okay. Will do. > > -Eric > >> for (offset = startoff; offset <= endoff; offset = lastoffset + 1) { >> offset_fsb = XFS_B_TO_FSBT(mp, offset); >> >> _______________________________________________ >> xfs mailing list >> xfs@oss.sgi.com >> http://oss.sgi.com/mailman/listinfo/xfs >> > > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs