[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181226030642.72757-1-kjlu@umn.edu>
Date: Tue, 25 Dec 2018 21:06:40 -0600
From: Kangjie Lu <kjlu@....edu>
To: kjlu@....edu
Cc: pakki001@....edu, Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Davidlohr Bueso <dbueso@...e.de>,
David Howells <dhowells@...hat.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH] fs: proc: check status of register_filesystem
register_filesystem() could fail. The fix issues an error message if it
fails.
Signed-off-by: Kangjie Lu <kjlu@....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)
Powered by blists - more mailing lists