aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-11-07 19:59:26 -0500
committerDave Chinner <david@fromorbit.com>2016-11-07 19:59:26 -0500
commit4fd29ec47212c8cbf98916af519019ccc5e58e49 (patch)
tree511491b4f2a7fdfca06963a04538772cdebc3276
parent5e52365ac86394ce4e5e2305ef4e66bd05cbf120 (diff)
xfs: check return value of _trans_reserve_quota_nblks
Check the return value of xfs_trans_reserve_quota_nblks for errors. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index c6eb21940783..71dd6d783710 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -4902,8 +4902,11 @@ xfs_bmap_del_extent_delay(
4902 * sb counters as we might have to borrow some blocks for the 4902 * sb counters as we might have to borrow some blocks for the
4903 * indirect block accounting. 4903 * indirect block accounting.
4904 */ 4904 */
4905 xfs_trans_reserve_quota_nblks(NULL, ip, -((long)del->br_blockcount), 0, 4905 error = xfs_trans_reserve_quota_nblks(NULL, ip,
4906 -((long)del->br_blockcount), 0,
4906 isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS); 4907 isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS);
4908 if (error)
4909 return error;
4907 ip->i_delayed_blks -= del->br_blockcount; 4910 ip->i_delayed_blks -= del->br_blockcount;
4908 4911
4909 if (whichfork == XFS_COW_FORK) 4912 if (whichfork == XFS_COW_FORK)