diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-01-27 04:23:30 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-02-03 20:18:49 +0300 |
commit | 35b1101099e85af74a46b8e36f4d1fdac0367ffd (patch) | |
tree | cda160dcae123004c563ecd1cebfe54c756aa428 /fs/xfs/xfs_iomap.c | |
parent | 8554650003b8a66f3dd357692ab73101d088d938 (diff) | |
download | linux-35b1101099e85af74a46b8e36f4d1fdac0367ffd.tar.xz |
xfs: remove xfs_trans_unreserve_quota_nblks completely
xfs_trans_cancel will release all the quota resources that were reserved
on behalf of the transaction, so get rid of the explicit unreserve step.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index b05cfeb09301..b046eadd3b21 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -253,7 +253,7 @@ xfs_iomap_write_direct( error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK, XFS_IEXT_ADD_NOSPLIT_CNT); if (error) - goto out_res_cancel; + goto out_trans_cancel; xfs_trans_ijoin(tp, ip, 0); @@ -265,7 +265,7 @@ xfs_iomap_write_direct( error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb, bmapi_flags, 0, imap, &nimaps); if (error) - goto out_res_cancel; + goto out_trans_cancel; /* * Complete the transaction @@ -289,8 +289,6 @@ out_unlock: xfs_iunlock(ip, XFS_ILOCK_EXCL); return error; -out_res_cancel: - xfs_trans_unreserve_quota_nblks(tp, ip, (long)qblocks, 0, quota_flag); out_trans_cancel: xfs_trans_cancel(tp); goto out_unlock; |