| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] Check return value of xfs_buf_get_noaddr() |
| From: | Lachlan McIlroy <lachlan@xxxxxxx> |
| Date: | Thu, 04 Dec 2008 16:39:29 +1100 |
| Reply-to: | lachlan@xxxxxxx |
| User-agent: | Thunderbird 2.0.0.18 (X11/20081105) |
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); |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Assertion failed: atomic_read(&mp->m_active_trans), Donald Douwsma |
|---|---|
| Next by Date: | [PATCH] Remove unused variable in ktrace_free(), Lachlan McIlroy |
| Previous by Thread: | [XFS updates] XFS development tree branch, master, updated. v2.6.28-rc3-1102-g5a8d0f3, xfs |
| Next by Thread: | Re: [PATCH] Check return value of xfs_buf_get_noaddr(), Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |