From: Darrick J. Wong Date: Tue, 10 Jan 2017 02:16:33 +0000 (-0600) Subject: xfs: check return value of _trans_reserve_quota_nblks X-Git-Tag: v4.10.0-rc1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6921638c63272a54194031f8cd95851cb9b18939;p=thirdparty%2Fxfsprogs-dev.git xfs: check return value of _trans_reserve_quota_nblks Souce kernel commit: 4fd29ec47212c8cbf98916af519019ccc5e58e49 Check the return value of xfs_trans_reserve_quota_nblks for errors. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 165d863f8..0e2f45049 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -4897,6 +4897,8 @@ xfs_bmap_del_extent_delay( error = xfs_trans_reserve_quota_nblks(NULL, ip, -((long)del->br_blockcount), 0, isrt ? XFS_QMOPT_RES_RTBLKS : XFS_QMOPT_RES_REGBLKS); + if (error) + return error; ip->i_delayed_blks -= del->br_blockcount; if (whichfork == XFS_COW_FORK)