Skip to content

Commit f7b9ee7

Browse files
Christoph HellwigChandan Babu R
authored andcommitted
xfs: consolidate the xfs_quota_reserve_blkres definitions
xfs_trans_reserve_quota_nblks is already stubbed out if quota support is disabled, no need for an extra xfs_quota_reserve_blkres stub. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: "Darrick J. Wong" <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
1 parent 67a841f commit f7b9ee7

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

fs/xfs/xfs_quota.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,6 @@ extern int xfs_qm_newmount(struct xfs_mount *, uint *, uint *);
123123
extern void xfs_qm_mount_quotas(struct xfs_mount *);
124124
extern void xfs_qm_unmount(struct xfs_mount *);
125125
extern void xfs_qm_unmount_quotas(struct xfs_mount *);
126-
127-
static inline int
128-
xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks)
129-
{
130-
return xfs_trans_reserve_quota_nblks(NULL, ip, blocks, 0, false);
131-
}
132126
bool xfs_inode_near_dquot_enforcement(struct xfs_inode *ip, xfs_dqtype_t type);
133127

134128
# ifdef CONFIG_XFS_LIVE_HOOKS
@@ -187,12 +181,6 @@ static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,
187181
return 0;
188182
}
189183

190-
static inline int
191-
xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks)
192-
{
193-
return 0;
194-
}
195-
196184
static inline int
197185
xfs_trans_reserve_quota_icreate(struct xfs_trans *tp, struct xfs_dquot *udqp,
198186
struct xfs_dquot *gdqp, struct xfs_dquot *pdqp, int64_t dblocks)
@@ -221,6 +209,12 @@ xfs_trans_reserve_quota_icreate(struct xfs_trans *tp, struct xfs_dquot *udqp,
221209

222210
#endif /* CONFIG_XFS_QUOTA */
223211

212+
static inline int
213+
xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks)
214+
{
215+
return xfs_trans_reserve_quota_nblks(NULL, ip, blocks, 0, false);
216+
}
217+
224218
static inline int
225219
xfs_quota_unreserve_blkres(struct xfs_inode *ip, int64_t blocks)
226220
{

0 commit comments

Comments
 (0)