summaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-09-17 14:10:18 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-18 04:31:01 +0200
commit8061a6fa564fe0e71601632758b78d2ba737663c (patch)
treeffcf3cbd15d8b7a906d05644acd216c4a3a64200 /fs/9p
parentatomic_open: take care of EEXIST in no-open case with O_CREAT|O_EXCL in fs/na... (diff)
downloadlinux-8061a6fa564fe0e71601632758b78d2ba737663c.tar.xz
linux-8061a6fa564fe0e71601632758b78d2ba737663c.zip
9p: don't forget to destroy inode cache if fscache registration fails
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/v9fs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 58e6cbce4156..08f2e1e9a7e6 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -603,10 +603,11 @@ static int v9fs_cache_register(void)
if (ret < 0)
return ret;
#ifdef CONFIG_9P_FSCACHE
- return fscache_register_netfs(&v9fs_cache_netfs);
-#else
- return ret;
+ ret = fscache_register_netfs(&v9fs_cache_netfs);
+ if (ret < 0)
+ v9fs_destroy_inode_cache();
#endif
+ return ret;
}
static void v9fs_cache_unregister(void)