9p: don't forget to destroy inode cache if fscache registration fails
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
03da633aa7
commit
8061a6fa56
|
@ -603,10 +603,11 @@ static int v9fs_cache_register(void)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
#ifdef CONFIG_9P_FSCACHE
|
#ifdef CONFIG_9P_FSCACHE
|
||||||
return fscache_register_netfs(&v9fs_cache_netfs);
|
ret = fscache_register_netfs(&v9fs_cache_netfs);
|
||||||
#else
|
if (ret < 0)
|
||||||
return ret;
|
v9fs_destroy_inode_cache();
|
||||||
#endif
|
#endif
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void v9fs_cache_unregister(void)
|
static void v9fs_cache_unregister(void)
|
||||||
|
|
Loading…
Reference in New Issue