blob: 399139f6726b47e16ab9ca427af6593f58c6a7cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
From: Sankar P <psankar@novell.com>
Subject: novfs: backing device info initialization
References: bnc#623472
Patch-mainline: no
The patch initializes and destroys the backing device info struct
for the novfs properly. Fixes an OOPS as well.
Acked-by: Jan Kara <jack@novell.com>
Acked-by: Sankar P <psankar@novell.com>
Signed-off-by: Anders Johansson <ajohansson@novell.com>
diff --git a/fs/novfs/inode.c b/fs/novfs/inode.c
index 2bc9cc0..19e481c 100644
--- a/fs/novfs/inode.c
+++ b/fs/novfs/inode.c
@@ -3980,6 +3980,17 @@ int __init init_novfs(void)
inHAX = 0;
inHAXTime = get_nanosecond_time();
+ retCode = bdi_init(&novfs_backing_dev_info);
+
+ if(!retCode)
+ retCode = bdi_register(&novfs_backing_dev_info, NULL, "novfs-map");
+ if (retCode) {
+ bdi_destroy(&novfs_backing_dev_info);
+ goto bdi_fail;
+ }
+
+
+
retCode = novfs_proc_init();
novfs_profile_init();
@@ -3995,6 +4006,8 @@ int __init init_novfs(void)
novfs_scope_exit();
}
}
+
+bdi_fail:
return (retCode);
}
@@ -4010,6 +4023,8 @@ void __exit exit_novfs(void)
kfree(novfs_current_mnt);
novfs_current_mnt = NULL;
}
+
+ bdi_destroy(&novfs_backing_dev_info);
}
int novfs_lock_inode_cache(struct inode *i)
|