summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-01-23 03:48:34 +0300
committerDarrick J. Wong <djwong@kernel.org>2021-02-03 20:18:49 +0300
commitad4a74739708e193c21245dae908ff50f72ff207 (patch)
treebea1c6da89ad35035211aaadaa4a7b2e9d7c642d /fs/xfs/xfs_inode.c
parent35b1101099e85af74a46b8e36f4d1fdac0367ffd (diff)
downloadlinux-ad4a74739708e193c21245dae908ff50f72ff207.tar.xz
xfs: clean up icreate quota reservation calls
Create a proper helper so that inode creation calls can reserve quota with a dedicated function. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index e2a1db4cee43..4bbd2fb628f7 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1037,8 +1037,7 @@ xfs_create(
/*
* Reserve disk quota and the inode.
*/
- error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp,
- pdqp, resblks, 1, 0);
+ error = xfs_trans_reserve_quota_icreate(tp, udqp, gdqp, pdqp, resblks);
if (error)
goto out_trans_cancel;
@@ -1169,8 +1168,7 @@ xfs_create_tmpfile(
if (error)
goto out_release_inode;
- error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp,
- pdqp, resblks, 1, 0);
+ error = xfs_trans_reserve_quota_icreate(tp, udqp, gdqp, pdqp, resblks);
if (error)
goto out_trans_cancel;