]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: check return value of _trans_reserve_quota_nblks
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 10 Jan 2017 02:16:33 +0000 (20:16 -0600)
committerEric Sandeen <sandeen@redhat.com>
Tue, 10 Jan 2017 02:16:33 +0000 (20:16 -0600)
Souce kernel commit: 4fd29ec47212c8cbf98916af519019ccc5e58e49

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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c

index 165d863f8e4d4da9435f665a29fc0ebcc2e8c8bb..0e2f450495253519f4fbf0f267d18dfd4556d367 100644 (file)
@@ -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)