nfsd: make find/get/put file available outside nfs4state.c
authorChristoph Hellwig <hch@lst.de>
Thu, 14 Aug 2014 06:50:16 +0000 (08:50 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 2 Feb 2015 17:09:41 +0000 (18:09 +0100)
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/nfsd/nfs4state.c
fs/nfsd/state.h

index 75faacb03e8e8770228c826715d18ea6be41c366..f5fc5d72c3623d759f885431bd17142725890474 100644 (file)
@@ -272,7 +272,7 @@ static void nfsd4_free_file_rcu(struct rcu_head *rcu)
        kmem_cache_free(file_slab, fp);
 }
 
-static inline void
+void
 put_nfs4_file(struct nfs4_file *fi)
 {
        might_lock(&state_lock);
@@ -285,12 +285,6 @@ put_nfs4_file(struct nfs4_file *fi)
        }
 }
 
-static inline void
-get_nfs4_file(struct nfs4_file *fi)
-{
-       atomic_inc(&fi->fi_ref);
-}
-
 static struct file *
 __nfs4_get_fd(struct nfs4_file *f, int oflag)
 {
@@ -3295,7 +3289,7 @@ find_file_locked(struct knfsd_fh *fh, unsigned int hashval)
        return NULL;
 }
 
-static struct nfs4_file *
+struct nfs4_file *
 find_file(struct knfsd_fh *fh)
 {
        struct nfs4_file *fp;
index 55a3ece5fe0678272e2dd5d572560c9a22517112..8bc961e192f2b07b9eeb62b5d7f9f683f3046d4c 100644 (file)
@@ -573,6 +573,13 @@ extern struct nfs4_client_reclaim *nfs4_client_to_reclaim(const char *name,
                                                        struct nfsd_net *nn);
 extern bool nfs4_has_reclaimed_state(const char *name, struct nfsd_net *nn);
 
+struct nfs4_file *find_file(struct knfsd_fh *fh);
+void put_nfs4_file(struct nfs4_file *fi);
+static inline void get_nfs4_file(struct nfs4_file *fi)
+{
+       atomic_inc(&fi->fi_ref);
+}
+
 /* grace period management */
 void nfsd4_end_grace(struct nfsd_net *nn);
 
This page took 0.028996 seconds and 5 git commands to generate.