mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
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>
This commit is contained in:
parent
35b1101099
commit
ad4a747397
4 changed files with 31 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue