Skip to content

Commit cd61c52

Browse files
author
Christoph Hellwig
committed
nfsd: make lookup/alloc/unhash_stid available outside nfs4state.c
Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 9558f25 commit cd61c52

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

fs/nfsd/nfs4state.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static void nfs4_file_put_access(struct nfs4_file *fp, u32 access)
476476
__nfs4_file_put_access(fp, O_RDONLY);
477477
}
478478

479-
static struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl,
479+
struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl,
480480
struct kmem_cache *slab)
481481
{
482482
struct nfs4_stid *stid;
@@ -680,7 +680,7 @@ static void nfs4_put_deleg_lease(struct nfs4_file *fp)
680680
}
681681
}
682682

683-
static void unhash_stid(struct nfs4_stid *s)
683+
void nfs4_unhash_stid(struct nfs4_stid *s)
684684
{
685685
s->sc_type = 0;
686686
}
@@ -988,7 +988,7 @@ static void unhash_lock_stateid(struct nfs4_ol_stateid *stp)
988988

989989
list_del_init(&stp->st_locks);
990990
unhash_ol_stateid(stp);
991-
unhash_stid(&stp->st_stid);
991+
nfs4_unhash_stid(&stp->st_stid);
992992
}
993993

994994
static void release_lock_stateid(struct nfs4_ol_stateid *stp)
@@ -4433,7 +4433,7 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
44334433
return status;
44344434
}
44354435

4436-
static __be32
4436+
__be32
44374437
nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate,
44384438
stateid_t *stateid, unsigned char typemask,
44394439
struct nfs4_stid **s, struct nfsd_net *nn)

fs/nfsd/state.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,12 @@ struct nfsd_net;
545545
extern __be32 nfs4_preprocess_stateid_op(struct net *net,
546546
struct nfsd4_compound_state *cstate,
547547
stateid_t *stateid, int flags, struct file **filp);
548+
__be32 nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate,
549+
stateid_t *stateid, unsigned char typemask,
550+
struct nfs4_stid **s, struct nfsd_net *nn);
551+
struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl,
552+
struct kmem_cache *slab);
553+
void nfs4_unhash_stid(struct nfs4_stid *s);
548554
void nfs4_put_stid(struct nfs4_stid *s);
549555
void nfs4_remove_reclaim_record(struct nfs4_client_reclaim *, struct nfsd_net *);
550556
extern void nfs4_release_reclaim(struct nfsd_net *);

0 commit comments

Comments
 (0)