From: Eric Sandeen <sandeen@sandeen.net>
To: lachlan@sgi.com
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] Check return value of xfs_buf_get_noaddr()
Date: Thu, 04 Dec 2008 09:28:14 -0600 [thread overview]
Message-ID: <4937F70E.4060600@sandeen.net> (raw)
In-Reply-To: <49376D11.4010507@sgi.com>
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);
-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
next prev parent reply other threads:[~2008-12-04 16:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 5:39 [PATCH] Check return value of xfs_buf_get_noaddr() Lachlan McIlroy
2008-12-04 7:09 ` Christoph Hellwig
2008-12-04 15:28 ` Eric Sandeen [this message]
2008-12-05 2:05 ` Lachlan McIlroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4937F70E.4060600@sandeen.net \
--to=sandeen@sandeen.net \
--cc=lachlan@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox