summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-mod.c
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2016-11-04 21:32:25 +0100
committerMike Marshall <hubcap@omnibond.com>2016-11-07 16:41:55 +0100
commitdc0336214eb07ee9de2a41dd4c81c744ffa419ac (patch)
tree56c9ca467f36588615993f2b163c29bc64109568 /fs/orangefs/orangefs-mod.c
parentorangefs: don't use d_time (diff)
downloadlinux-dc0336214eb07ee9de2a41dd4c81c744ffa419ac.tar.xz
linux-dc0336214eb07ee9de2a41dd4c81c744ffa419ac.zip
orangefs: clean up debugfs
We recently refactored the Orangefs debugfs code. The refactor seemed to trigger dan.carpenter@oracle.com's static tester to find a possible double-free in the code. While designing the fix we saw a condition under which the buffer being freed could also be overflowed. We also realized how to rebuild the related debugfs file's "contents" (a string) without deleting and re-creating the file. This fix should eliminate the possible double-free, the potential overflow and improve code readability. Signed-off-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-mod.c')
-rw-r--r--fs/orangefs/orangefs-mod.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c
index 2e5b03065f34..4113eb0495bf 100644
--- a/fs/orangefs/orangefs-mod.c
+++ b/fs/orangefs/orangefs-mod.c
@@ -124,7 +124,7 @@ static int __init orangefs_init(void)
* unknown at boot time.
*
* orangefs_prepare_debugfs_help_string will be used again
- * later to rebuild the debug-help file after the client starts
+ * later to rebuild the debug-help-string after the client starts
* and passes along the needed info. The argument signifies
* which time orangefs_prepare_debugfs_help_string is being
* called.
@@ -152,7 +152,9 @@ static int __init orangefs_init(void)
ret = register_filesystem(&orangefs_fs_type);
if (ret == 0) {
- pr_info("orangefs: module version %s loaded\n", ORANGEFS_VERSION);
+ pr_info("%s: module version %s loaded\n",
+ __func__,
+ ORANGEFS_VERSION);
ret = 0;
goto out;
}