fscache: fix build on !CONFIG_SYSCTL
authorTejun Heo <tj@kernel.org>
Sat, 24 Jul 2010 09:10:09 +0000 (11:10 +0200)
committerTejun Heo <tj@kernel.org>
Sat, 24 Jul 2010 09:10:09 +0000 (11:10 +0200)
Commit 8b8edefa (fscache: convert object to use workqueue instead of
slow-work) made fscache_exit() call unregister_sysctl_table()
unconditionally breaking build when sysctl is disabled.  Fix it by
putting it inside CONFIG_SYSCTL.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Howells <dhowells@redhat.com>
fs/fscache/main.c

index 500936d9fff21f222069f05ccbbca4136618e49f..f9d856773f7993ab7eb99ec0af67daea119972e1 100644 (file)
@@ -186,7 +186,9 @@ static void __exit fscache_exit(void)
 
        kobject_put(fscache_root);
        kmem_cache_destroy(fscache_cookie_jar);
+#ifdef CONFIG_SYSCTL
        unregister_sysctl_table(fscache_sysctl_header);
+#endif
        fscache_proc_cleanup();
        destroy_workqueue(fscache_op_wq);
        destroy_workqueue(fscache_object_wq);