summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRobert Love <rml@novell.com>2005-07-25 21:17:34 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 22:37:22 +0200
commite5ca844a9d795e97c08bc7901c62a48c28469eb0 (patch)
treebef45e498d4ec2cf3387fac7a465819475060549 /fs
parent[PATCH] inotify: change default limits (diff)
downloadlinux-e5ca844a9d795e97c08bc7901c62a48c28469eb0.tar.xz
linux-e5ca844a9d795e97c08bc7901c62a48c28469eb0.zip
[PATCH] inotify: check retval in init
Check for (unlikely) errors in the filesystem initialization stuff in our module_init() function. Signed-off-by: Robert Love <rml@novell.com> Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/inotify.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/inotify.c b/fs/inotify.c
index 6a0ba2c858e6..cdfff9067149 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -1025,8 +1025,15 @@ static struct file_system_type inotify_fs_type = {
*/
static int __init inotify_setup(void)
{
- register_filesystem(&inotify_fs_type);
+ int ret;
+
+ ret = register_filesystem(&inotify_fs_type);
+ if (unlikely(ret))
+ panic("inotify: register_filesystem returned %d!\n", ret);
+
inotify_mnt = kern_mount(&inotify_fs_type);
+ if (unlikely(PTR_ERR(inotify_mnt)))
+ panic("inotify: kern_mount ret %ld!\n", PTR_ERR(inotify_mnt));
inotify_max_queued_events = 16384;
inotify_max_user_instances = 128;