From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 2/4] xfs: clean up quota reservation wrappers
Date: Mon, 18 Jan 2021 14:11:44 -0800 [thread overview]
Message-ID: <161100790484.88678.13971476776021338640.stgit@magnolia> (raw)
In-Reply-To: <161100789347.88678.17195697099723545426.stgit@magnolia>
From: Darrick J. Wong <djwong@kernel.org>
Replace a couple of quota reservation macros with properly typechecked
static inline functions ahead of more restructuring in the next patches.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
fs/xfs/xfs_quota.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index 5a62398940d0..bd28d17941e7 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -151,8 +151,13 @@ static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,
#define xfs_qm_unmount_quotas(mp)
#endif /* CONFIG_XFS_QUOTA */
-#define xfs_trans_unreserve_quota_nblks(tp, ip, nblks, ninos, flags) \
- xfs_trans_reserve_quota_nblks(tp, ip, -(nblks), -(ninos), flags)
+static inline int
+xfs_trans_unreserve_quota_nblks(struct xfs_trans *tp, struct xfs_inode *ip,
+ int64_t nblks, long ninos, unsigned int flags)
+{
+ return xfs_trans_reserve_quota_nblks(tp, ip, -nblks, -ninos, flags);
+}
+
#define xfs_trans_reserve_quota(tp, mp, ud, gd, pd, nb, ni, f) \
xfs_trans_reserve_quota_bydquots(tp, mp, ud, gd, pd, nb, ni, \
f | XFS_QMOPT_RES_REGBLKS)
next prev parent reply other threads:[~2021-01-18 22:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 22:11 [PATCHSET 0/4] xfs: minor cleanups of the quota functions Darrick J. Wong
2021-01-18 22:11 ` [PATCH 1/4] xfs: clean up quota reservation callsites Darrick J. Wong
2021-01-19 6:35 ` Christoph Hellwig
2021-01-18 22:11 ` Darrick J. Wong [this message]
2021-01-19 6:38 ` [PATCH 2/4] xfs: clean up quota reservation wrappers Christoph Hellwig
2021-01-18 22:11 ` [PATCH 3/4] xfs: create convenience wrappers for incore quota block reservations Darrick J. Wong
2021-01-19 6:44 ` Christoph Hellwig
2021-01-19 19:47 ` Darrick J. Wong
2021-01-19 20:26 ` Darrick J. Wong
2021-01-20 4:33 ` [PATCH v2.1 " Darrick J. Wong
2021-01-18 22:11 ` [PATCH 4/4] xfs: clean up icreate quota reservation calls Darrick J. Wong
2021-01-19 6:46 ` Christoph Hellwig
2021-01-23 18:51 [PATCHSET v2 0/4] xfs: minor cleanups of the quota functions Darrick J. Wong
2021-01-23 18:51 ` [PATCH 2/4] xfs: clean up quota reservation wrappers Darrick J. Wong
2021-01-25 15:13 ` Brian Foster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=161100790484.88678.13971476776021338640.stgit@magnolia \
--to=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).