Skip to content

Commit

Permalink
[PATCH] inotify: check retval in init
Browse files Browse the repository at this point in the history
Check for (unlikely) errors in the filesystem initialization stuff in
our module_init() function.

Signed-off-by: Robert Love <[email protected]>
Signed-off-by: John McCutchan <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Robert Love authored and Linus Torvalds committed Jul 26, 2005
1 parent 1b2ccf0 commit e5ca844
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fs/inotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e5ca844

Please sign in to comment.