Skip to content

Commit e8051c8

Browse files
Jeff LaytonJ. Bruce Fields
authored andcommitted
nfsd: eliminate nfsd4_init_callback
It's just an obfuscated INIT_WORK call. Just make the work_func_t a non-static symbol and use a normal INIT_WORK call. Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent d5d5c30 commit e8051c8

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,8 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
10111011
run_nfsd4_cb(cb);
10121012
}
10131013

1014-
static void nfsd4_do_callback_rpc(struct work_struct *w)
1014+
void
1015+
nfsd4_do_callback_rpc(struct work_struct *w)
10151016
{
10161017
struct nfsd4_callback *cb = container_of(w, struct nfsd4_callback, cb_work);
10171018
struct nfs4_client *clp = cb->cb_clp;
@@ -1031,11 +1032,6 @@ static void nfsd4_do_callback_rpc(struct work_struct *w)
10311032
cb->cb_ops, cb);
10321033
}
10331034

1034-
void nfsd4_init_callback(struct nfsd4_callback *cb)
1035-
{
1036-
INIT_WORK(&cb->cb_work, nfsd4_do_callback_rpc);
1037-
}
1038-
10391035
void nfsd4_cb_recall(struct nfs4_delegation *dp)
10401036
{
10411037
struct nfsd4_callback *cb = &dp->dl_recall;

fs/nfsd/nfs4state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_ol_stateid *stp, struct sv
592592
fh_copy_shallow(&dp->dl_fh, &current_fh->fh_handle);
593593
dp->dl_time = 0;
594594
atomic_set(&dp->dl_count, 1);
595-
nfsd4_init_callback(&dp->dl_recall);
595+
INIT_WORK(&dp->dl_recall.cb_work, nfsd4_do_callback_rpc);
596596
return dp;
597597
}
598598

@@ -1677,7 +1677,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name,
16771677
spin_unlock(&nn->client_lock);
16781678
return NULL;
16791679
}
1680-
nfsd4_init_callback(&clp->cl_cb_null);
1680+
INIT_WORK(&clp->cl_cb_null.cb_work, nfsd4_do_callback_rpc);
16811681
clp->cl_time = get_seconds();
16821682
clear_bit(0, &clp->cl_cb_slot_busy);
16831683
copy_verf(clp, verf);

fs/nfsd/state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir,
436436
extern __be32 nfs4_check_open_reclaim(clientid_t *clid,
437437
struct nfsd4_compound_state *cstate, struct nfsd_net *nn);
438438
extern int set_callback_cred(void);
439-
extern void nfsd4_init_callback(struct nfsd4_callback *);
439+
void nfsd4_do_callback_rpc(struct work_struct *w);
440440
extern void nfsd4_probe_callback(struct nfs4_client *clp);
441441
extern void nfsd4_probe_callback_sync(struct nfs4_client *clp);
442442
extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *);

0 commit comments

Comments
 (0)