aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2011-09-20 09:56:55 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:01 -0400
commit2a30f36d9069b0646dcdd73def5fd7ab674bffd6 (patch)
treed7be19830eaa3c85b9e06882ccec369630ce9ca2 /fs/xfs/xfs_inode.c
parentb522950f0ab8551f2ef56c210ebd50e6c6396601 (diff)
xfs: Check the return value of xfs_trans_get_buf()
Check the return value of xfs_trans_get_buf() and fail appropriately. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 7f237ba3c292..d689253fdfda 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1644,7 +1644,7 @@ xfs_iunlink_remove(
1644 * inodes that are in memory - they all must be marked stale and attached to 1644 * inodes that are in memory - they all must be marked stale and attached to
1645 * the cluster buffer. 1645 * the cluster buffer.
1646 */ 1646 */
1647STATIC void 1647STATIC int
1648xfs_ifree_cluster( 1648xfs_ifree_cluster(
1649 xfs_inode_t *free_ip, 1649 xfs_inode_t *free_ip,
1650 xfs_trans_t *tp, 1650 xfs_trans_t *tp,
@@ -1690,6 +1690,8 @@ xfs_ifree_cluster(
1690 mp->m_bsize * blks_per_cluster, 1690 mp->m_bsize * blks_per_cluster,
1691 XBF_LOCK); 1691 XBF_LOCK);
1692 1692
1693 if (!bp)
1694 return ENOMEM;
1693 /* 1695 /*
1694 * Walk the inodes already attached to the buffer and mark them 1696 * Walk the inodes already attached to the buffer and mark them
1695 * stale. These will all have the flush locks held, so an 1697 * stale. These will all have the flush locks held, so an
@@ -1799,6 +1801,7 @@ retry:
1799 } 1801 }
1800 1802
1801 xfs_perag_put(pag); 1803 xfs_perag_put(pag);
1804 return 0;
1802} 1805}
1803 1806
1804/* 1807/*
@@ -1878,10 +1881,10 @@ xfs_ifree(
1878 dip->di_mode = 0; 1881 dip->di_mode = 0;
1879 1882
1880 if (delete) { 1883 if (delete) {
1881 xfs_ifree_cluster(ip, tp, first_ino); 1884 error = xfs_ifree_cluster(ip, tp, first_ino);
1882 } 1885 }
1883 1886
1884 return 0; 1887 return error;
1885} 1888}
1886 1889
1887/* 1890/*