xfs
[Top] [All Lists]

Re: [PATCH] Check return value of xfs_buf_get_noaddr()

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH] Check return value of xfs_buf_get_noaddr()
From: Lachlan McIlroy <lachlan@xxxxxxx>
Date: Fri, 05 Dec 2008 13:05:40 +1100
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <4937F70E.4060600@xxxxxxxxxxx>
References: <49376D11.4010507@xxxxxxx> <4937F70E.4060600@xxxxxxxxxxx>
Reply-to: lachlan@xxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081105)
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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




<Prev in Thread] Current Thread [Next in Thread>