Skip to content

Commit ba102a6

Browse files
Christoph HellwigDarrick J. Wong
authored andcommitted
xfs: remove xfs_group_intent_hold and xfs_group_intent_rele
Each of them just has a single caller, so fold them. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 759cc19 commit ba102a6

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

fs/xfs/xfs_drain.c

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -94,31 +94,11 @@ static inline int xfs_defer_drain_wait(struct xfs_defer_drain *dr)
9494
}
9595

9696
/*
97-
* Declare an intent to update group metadata. Other threads that need
98-
* exclusive access can decide to back off if they see declared intentions.
99-
*/
100-
static void
101-
xfs_group_intent_hold(
102-
struct xfs_group *xg)
103-
{
104-
trace_xfs_group_intent_hold(xg, __return_address);
105-
xfs_defer_drain_grab(&xg->xg_intents_drain);
106-
}
107-
108-
/*
109-
* Release our intent to update this groups metadata.
110-
*/
111-
static void
112-
xfs_group_intent_rele(
113-
struct xfs_group *xg)
114-
{
115-
trace_xfs_group_intent_rele(xg, __return_address);
116-
xfs_defer_drain_rele(&xg->xg_intents_drain);
117-
}
118-
119-
/*
120-
* Get a passive reference to the AG that contains a fsbno and declare an intent
121-
* to update its metadata.
97+
* Get a passive reference to the AG that contains a fsbno and declare an
98+
* intent to update its metadata.
99+
*
100+
* Other threads that need exclusive access can decide to back off if they see
101+
* declared intentions.
122102
*/
123103
struct xfs_perag *
124104
xfs_perag_intent_get(
@@ -131,7 +111,8 @@ xfs_perag_intent_get(
131111
if (!pag)
132112
return NULL;
133113

134-
xfs_group_intent_hold(pag_group(pag));
114+
trace_xfs_group_intent_hold(pag_group(pag), __return_address);
115+
xfs_defer_drain_grab(pag_group(pag).xg_intents_drain);
135116
return pag;
136117
}
137118

@@ -143,7 +124,8 @@ void
143124
xfs_perag_intent_put(
144125
struct xfs_perag *pag)
145126
{
146-
xfs_group_intent_rele(pag_group(pag));
127+
trace_xfs_group_intent_rele(pag_group(pag), __return_address);
128+
xfs_defer_drain_rele(pag_group(pag).xg_intents_drain);
147129
xfs_perag_put(pag);
148130
}
149131

0 commit comments

Comments
 (0)