Merge tag 'regmap-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux/fpc-iii.git] / fs / nfs / cache_lib.h
blob220ee409abc46d80d5144414efb135a3eda265fd
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Helper routines for the NFS client caches
5 * Copyright (c) 2009 Trond Myklebust <Trond.Myklebust@netapp.com>
6 */
8 #include <linux/completion.h>
9 #include <linux/sunrpc/cache.h>
10 #include <linux/atomic.h>
13 * Deferred request handling
15 struct nfs_cache_defer_req {
16 struct cache_req req;
17 struct cache_deferred_req deferred_req;
18 struct completion completion;
19 refcount_t count;
22 extern int nfs_cache_upcall(struct cache_detail *cd, char *entry_name);
23 extern struct nfs_cache_defer_req *nfs_cache_defer_req_alloc(void);
24 extern void nfs_cache_defer_req_put(struct nfs_cache_defer_req *dreq);
25 extern int nfs_cache_wait_for_upcall(struct nfs_cache_defer_req *dreq);
27 extern int nfs_cache_register_net(struct net *net, struct cache_detail *cd);
28 extern void nfs_cache_unregister_net(struct net *net, struct cache_detail *cd);
29 extern int nfs_cache_register_sb(struct super_block *sb,
30 struct cache_detail *cd);
31 extern void nfs_cache_unregister_sb(struct super_block *sb,
32 struct cache_detail *cd);