From f273387b048543f2b8b2d809cc65fca28e7788a1 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 27 Jan 2021 10:07:27 -0800 Subject: 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 Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_iomap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/xfs/xfs_iomap.c') diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index fe2bbd9b6fdb..70c341658c01 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -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; } -- cgit v1.2.3