mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 15:43:35 -04:00
xfs: mark xfs_perag_intent_{hold,rele} static
These two functions are only used inside of xfs_drain.c, so mark them static. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
5c8483cec3
commit
2ed27a5464
@@ -93,6 +93,27 @@ static inline int xfs_defer_drain_wait(struct xfs_defer_drain *dr)
|
||||
return wait_event_killable(dr->dr_waiters, !xfs_defer_drain_busy(dr));
|
||||
}
|
||||
|
||||
/*
|
||||
* Declare an intent to update AG metadata. Other threads that need exclusive
|
||||
* access can decide to back off if they see declared intentions.
|
||||
*/
|
||||
static void
|
||||
xfs_perag_intent_hold(
|
||||
struct xfs_perag *pag)
|
||||
{
|
||||
trace_xfs_perag_intent_hold(pag, __return_address);
|
||||
xfs_defer_drain_grab(&pag->pag_intents_drain);
|
||||
}
|
||||
|
||||
/* Release our intent to update this AG's metadata. */
|
||||
static void
|
||||
xfs_perag_intent_rele(
|
||||
struct xfs_perag *pag)
|
||||
{
|
||||
trace_xfs_perag_intent_rele(pag, __return_address);
|
||||
xfs_defer_drain_rele(&pag->pag_intents_drain);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a passive reference to the AG that contains a fsbno and declare an intent
|
||||
* to update its metadata.
|
||||
@@ -124,27 +145,6 @@ xfs_perag_intent_put(
|
||||
xfs_perag_put(pag);
|
||||
}
|
||||
|
||||
/*
|
||||
* Declare an intent to update AG metadata. Other threads that need exclusive
|
||||
* access can decide to back off if they see declared intentions.
|
||||
*/
|
||||
void
|
||||
xfs_perag_intent_hold(
|
||||
struct xfs_perag *pag)
|
||||
{
|
||||
trace_xfs_perag_intent_hold(pag, __return_address);
|
||||
xfs_defer_drain_grab(&pag->pag_intents_drain);
|
||||
}
|
||||
|
||||
/* Release our intent to update this AG's metadata. */
|
||||
void
|
||||
xfs_perag_intent_rele(
|
||||
struct xfs_perag *pag)
|
||||
{
|
||||
trace_xfs_perag_intent_rele(pag, __return_address);
|
||||
xfs_defer_drain_rele(&pag->pag_intents_drain);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for the intent update count for this AG to hit zero.
|
||||
* Callers must not hold any AG header buffers.
|
||||
|
||||
@@ -65,9 +65,6 @@ struct xfs_perag *xfs_perag_intent_get(struct xfs_mount *mp,
|
||||
xfs_fsblock_t fsbno);
|
||||
void xfs_perag_intent_put(struct xfs_perag *pag);
|
||||
|
||||
void xfs_perag_intent_hold(struct xfs_perag *pag);
|
||||
void xfs_perag_intent_rele(struct xfs_perag *pag);
|
||||
|
||||
int xfs_perag_intent_drain(struct xfs_perag *pag);
|
||||
bool xfs_perag_intent_busy(struct xfs_perag *pag);
|
||||
#else
|
||||
@@ -80,9 +77,6 @@ struct xfs_defer_drain { /* empty */ };
|
||||
xfs_perag_get((mp), XFS_FSB_TO_AGNO(mp, fsbno))
|
||||
#define xfs_perag_intent_put(pag) xfs_perag_put(pag)
|
||||
|
||||
static inline void xfs_perag_intent_hold(struct xfs_perag *pag) { }
|
||||
static inline void xfs_perag_intent_rele(struct xfs_perag *pag) { }
|
||||
|
||||
#endif /* CONFIG_XFS_DRAIN_INTENTS */
|
||||
|
||||
#endif /* XFS_DRAIN_H_ */
|
||||
|
||||
Reference in New Issue
Block a user