aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2014-04-18 14:44:03 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-05-06 17:54:57 -0400
commit50cc62317dece5173b56aa8d3569930b065ce47d (patch)
tree6d3d9ac0ce0360865e880eb2df9700661fe1a2e0
parent6f226e2ab1b895c8685e868af0a5f797fcaaaf57 (diff)
NFSd: Mark nfs4_free_lockowner and nfs4_free_openowner as static functions
They do not need to be used outside fs/nfsd/nfs4state.c Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/nfs4state.c24
-rw-r--r--fs/nfsd/state.h2
2 files changed, 12 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 841495aa9170..fcab9091f094 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -645,6 +645,12 @@ static void unhash_lockowner(struct nfs4_lockowner *lo)
645 } 645 }
646} 646}
647 647
648static void nfs4_free_lockowner(struct nfs4_lockowner *lo)
649{
650 kfree(lo->lo_owner.so_owner.data);
651 kmem_cache_free(lockowner_slab, lo);
652}
653
648static void release_lockowner(struct nfs4_lockowner *lo) 654static void release_lockowner(struct nfs4_lockowner *lo)
649{ 655{
650 unhash_lockowner(lo); 656 unhash_lockowner(lo);
@@ -699,6 +705,12 @@ static void release_last_closed_stateid(struct nfs4_openowner *oo)
699 } 705 }
700} 706}
701 707
708static void nfs4_free_openowner(struct nfs4_openowner *oo)
709{
710 kfree(oo->oo_owner.so_owner.data);
711 kmem_cache_free(openowner_slab, oo);
712}
713
702static void release_openowner(struct nfs4_openowner *oo) 714static void release_openowner(struct nfs4_openowner *oo)
703{ 715{
704 unhash_openowner(oo); 716 unhash_openowner(oo);
@@ -2553,18 +2565,6 @@ out_nomem:
2553 return -ENOMEM; 2565 return -ENOMEM;
2554} 2566}
2555 2567
2556void nfs4_free_openowner(struct nfs4_openowner *oo)
2557{
2558 kfree(oo->oo_owner.so_owner.data);
2559 kmem_cache_free(openowner_slab, oo);
2560}
2561
2562void nfs4_free_lockowner(struct nfs4_lockowner *lo)
2563{
2564 kfree(lo->lo_owner.so_owner.data);
2565 kmem_cache_free(lockowner_slab, lo);
2566}
2567
2568static void init_nfs4_replay(struct nfs4_replay *rp) 2568static void init_nfs4_replay(struct nfs4_replay *rp)
2569{ 2569{
2570 rp->rp_status = nfserr_serverfault; 2570 rp->rp_status = nfserr_serverfault;
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 5b3bbf24097c..fda9ce28b1b2 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -463,8 +463,6 @@ extern void nfs4_release_reclaim(struct nfsd_net *);
463extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir, 463extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir,
464 struct nfsd_net *nn); 464 struct nfsd_net *nn);
465extern __be32 nfs4_check_open_reclaim(clientid_t *clid, bool sessions, struct nfsd_net *nn); 465extern __be32 nfs4_check_open_reclaim(clientid_t *clid, bool sessions, struct nfsd_net *nn);
466extern void nfs4_free_openowner(struct nfs4_openowner *);
467extern void nfs4_free_lockowner(struct nfs4_lockowner *);
468extern int set_callback_cred(void); 466extern int set_callback_cred(void);
469extern void nfsd4_init_callback(struct nfsd4_callback *); 467extern void nfsd4_init_callback(struct nfsd4_callback *);
470extern void nfsd4_probe_callback(struct nfs4_client *clp); 468extern void nfsd4_probe_callback(struct nfs4_client *clp);