xfs: refactor reflink functions to use xfs_trans_alloc_inode

The two remaining callers of xfs_trans_reserve_quota_nblks are in the
reflink code.  These conversions aren't as uniform as the previous
conversions, so call that out in a separate patch.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Darrick J. Wong
2021-01-27 10:07:27 -08:00
parent 3de4eb106f
commit f273387b04
2 changed files with 23 additions and 33 deletions

View File

@@ -831,7 +831,8 @@ out_found_cow:
return xfs_bmbt_to_iomap(ip, iomap, &cmap, IOMAP_F_SHARED);
out_unlock:
xfs_iunlock(ip, lockmode);
if (lockmode)
xfs_iunlock(ip, lockmode);
return error;
}