From: Robert Love Date: Mon, 25 Jul 2005 19:17:34 +0000 (-0400) Subject: [PATCH] inotify: check retval in init X-Git-Tag: v2.6.13-rc4~69 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5ca844a9d795e97c08bc7901c62a48c28469eb0;p=linux-2.6 [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 Signed-off-by: John McCutchan Signed-off-by: Linus Torvalds --- diff --git a/fs/inotify.c b/fs/inotify.c index 6a0ba2c858..cdfff90671 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;