Skip to content

Commit 2ed27a5

Browse files
Christoph HellwigDarrick J. Wong
authored andcommitted
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 <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 5c8483c commit 2ed27a5

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed

fs/xfs/xfs_drain.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,27 @@ static inline int xfs_defer_drain_wait(struct xfs_defer_drain *dr)
9393
return wait_event_killable(dr->dr_waiters, !xfs_defer_drain_busy(dr));
9494
}
9595

96+
/*
97+
* Declare an intent to update AG metadata. Other threads that need exclusive
98+
* access can decide to back off if they see declared intentions.
99+
*/
100+
static void
101+
xfs_perag_intent_hold(
102+
struct xfs_perag *pag)
103+
{
104+
trace_xfs_perag_intent_hold(pag, __return_address);
105+
xfs_defer_drain_grab(&pag->pag_intents_drain);
106+
}
107+
108+
/* Release our intent to update this AG's metadata. */
109+
static void
110+
xfs_perag_intent_rele(
111+
struct xfs_perag *pag)
112+
{
113+
trace_xfs_perag_intent_rele(pag, __return_address);
114+
xfs_defer_drain_rele(&pag->pag_intents_drain);
115+
}
116+
96117
/*
97118
* Get a passive reference to the AG that contains a fsbno and declare an intent
98119
* to update its metadata.
@@ -124,27 +145,6 @@ xfs_perag_intent_put(
124145
xfs_perag_put(pag);
125146
}
126147

127-
/*
128-
* Declare an intent to update AG metadata. Other threads that need exclusive
129-
* access can decide to back off if they see declared intentions.
130-
*/
131-
void
132-
xfs_perag_intent_hold(
133-
struct xfs_perag *pag)
134-
{
135-
trace_xfs_perag_intent_hold(pag, __return_address);
136-
xfs_defer_drain_grab(&pag->pag_intents_drain);
137-
}
138-
139-
/* Release our intent to update this AG's metadata. */
140-
void
141-
xfs_perag_intent_rele(
142-
struct xfs_perag *pag)
143-
{
144-
trace_xfs_perag_intent_rele(pag, __return_address);
145-
xfs_defer_drain_rele(&pag->pag_intents_drain);
146-
}
147-
148148
/*
149149
* Wait for the intent update count for this AG to hit zero.
150150
* Callers must not hold any AG header buffers.

fs/xfs/xfs_drain.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ struct xfs_perag *xfs_perag_intent_get(struct xfs_mount *mp,
6565
xfs_fsblock_t fsbno);
6666
void xfs_perag_intent_put(struct xfs_perag *pag);
6767

68-
void xfs_perag_intent_hold(struct xfs_perag *pag);
69-
void xfs_perag_intent_rele(struct xfs_perag *pag);
70-
7168
int xfs_perag_intent_drain(struct xfs_perag *pag);
7269
bool xfs_perag_intent_busy(struct xfs_perag *pag);
7370
#else
@@ -80,9 +77,6 @@ struct xfs_defer_drain { /* empty */ };
8077
xfs_perag_get((mp), XFS_FSB_TO_AGNO(mp, fsbno))
8178
#define xfs_perag_intent_put(pag) xfs_perag_put(pag)
8279

83-
static inline void xfs_perag_intent_hold(struct xfs_perag *pag) { }
84-
static inline void xfs_perag_intent_rele(struct xfs_perag *pag) { }
85-
8680
#endif /* CONFIG_XFS_DRAIN_INTENTS */
8781

8882
#endif /* XFS_DRAIN_H_ */

0 commit comments

Comments
 (0)