瀏覽代碼

jfs: mising cleanup on register_filesystem() failure

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 13 年之前
父節點
當前提交
76bf09fcf7
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      fs/jfs/super.c

+ 7 - 1
fs/jfs/super.c

@@ -860,8 +860,14 @@ static int __init init_jfs_fs(void)
 	jfs_proc_init();
 #endif
 
-	return register_filesystem(&jfs_fs_type);
+	rc = register_filesystem(&jfs_fs_type);
+	if (!rc)
+		return 0;
 
+#ifdef PROC_FS_JFS
+	jfs_proc_clean();
+#endif
+	kthread_stop(jfsSyncThread);
 kill_committask:
 	for (i = 0; i < commit_threads; i++)
 		kthread_stop(jfsCommitThread[i]);