summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_quota.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-04-30 15:58:22 +0300
committerChandan Babu R <chandanbabu@kernel.org>2024-05-03 08:45:03 +0300
commitcc3c92e7e79eb5f7f3ec4d5790ade384b7d294f7 (patch)
tree6f14dcd434649cfd773a00d02235ce41652bbd9a /fs/xfs/xfs_quota.h
parentf7b9ee784511920545558db85da24d022fb2805f (diff)
downloadlinux-cc3c92e7e79eb5f7f3ec4d5790ade384b7d294f7.tar.xz
xfs: xfs_quota_unreserve_blkres can't fail
Unreserving quotas can't fail due to quota limits, and we'll notice a shut down file system a bit later in all the callers anyway. Return void and remove the error checking and propagation in the callers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_quota.h')
-rw-r--r--fs/xfs/xfs_quota.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index 621ea9d7cf06..23d71a55bbc0 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -215,10 +215,11 @@ xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks)
return xfs_trans_reserve_quota_nblks(NULL, ip, blocks, 0, false);
}
-static inline int
-xfs_quota_unreserve_blkres(struct xfs_inode *ip, int64_t blocks)
+static inline void
+xfs_quota_unreserve_blkres(struct xfs_inode *ip, uint64_t blocks)
{
- return xfs_quota_reserve_blkres(ip, -blocks);
+ /* don't return an error as unreserving quotas can't fail */
+ xfs_quota_reserve_blkres(ip, -(int64_t)blocks);
}
extern int xfs_mount_reset_sbqflags(struct xfs_mount *);