lkml.org 
[lkml]   [2018]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs: proc: check status of register_filesystem
Date
register_filesystem() could fail. The fix issues an error message if it
fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
fs/proc/root.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/proc/root.c b/fs/proc/root.c
index f4b1a9d2eca6..7dcd947cba23 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -141,7 +141,8 @@ void __init proc_root_init(void)
proc_mkdir("bus", NULL);
proc_sys_init();

- register_filesystem(&proc_fs_type);
+ if (register_filesystem(&proc_fs_type))
+ pr_err("failed to register the filesystem.\n");
}

static int proc_root_getattr(const struct path *path, struct kstat *stat,
--
2.17.2 (Apple Git-113)
\
 
 \ /
  Last update: 2018-12-26 04:08    [W:0.052 / U:3.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site