public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Check return value of xfs_buf_get_noaddr()
@ 2008-12-04  5:39 Lachlan McIlroy
  2008-12-04  7:09 ` Christoph Hellwig
  2008-12-04 15:28 ` Eric Sandeen
  0 siblings, 2 replies; 4+ messages in thread
From: Lachlan McIlroy @ 2008-12-04  5:39 UTC (permalink / raw)
  To: xfs-oss

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;

  	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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-05  2:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-12-05  2:05   ` Lachlan McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox