Skip to content

Commit

Permalink
9p: don't forget to destroy inode cache if fscache registration fails
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 18, 2013
1 parent 03da633 commit 8061a6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8061a6f

Please sign in to comment.