aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/cache_lib.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2011-11-25 09:13:12 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 18:20:26 -0500
commit9df69c81b469780b64f9b26bb87c048613fdeddf (patch)
tree76dc666bf8b8b18c2e3b628159d6a85e5cffa62b /fs/nfs/cache_lib.c
parent1b340d0118da1d7c60c664f17d7c8fce2bb1cd9d (diff)
NFS: DNS resolver PipeFS notifier introduced
This patch subscribes DNS resolver caches to RPC pipefs notifications. Notifier is registering on NFS module load. This notifier callback is responsible for creation/destruction of PipeFS DNS resolver cache directory. Note that no locking required in notifier callback because PipeFS superblock pointer is passed as an argument from it's creation or destruction routine and thus we can be sure about it's validity. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/cache_lib.c')
-rw-r--r--fs/nfs/cache_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/cache_lib.c b/fs/nfs/cache_lib.c
index 5dd017bbb7a2..5905a31211e5 100644
--- a/fs/nfs/cache_lib.c
+++ b/fs/nfs/cache_lib.c
@@ -112,7 +112,7 @@ int nfs_cache_wait_for_upcall(struct nfs_cache_defer_req *dreq)
112 return 0; 112 return 0;
113} 113}
114 114
115static int nfs_cache_register_sb(struct super_block *sb, struct cache_detail *cd) 115int nfs_cache_register_sb(struct super_block *sb, struct cache_detail *cd)
116{ 116{
117 int ret; 117 int ret;
118 struct dentry *dir; 118 struct dentry *dir;
@@ -147,7 +147,7 @@ err:
147 return ret; 147 return ret;
148} 148}
149 149
150static void nfs_cache_unregister_sb(struct super_block *sb, struct cache_detail *cd) 150void nfs_cache_unregister_sb(struct super_block *sb, struct cache_detail *cd)
151{ 151{
152 if (cd->u.pipefs.dir) 152 if (cd->u.pipefs.dir)
153 sunrpc_cache_unregister_pipefs(cd); 153 sunrpc_cache_unregister_pipefs(cd);