]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
orangefs: Dan Carpenter influenced cleanups...
authorMike Marshall <hubcap@omnibond.com>
Thu, 9 Feb 2017 19:38:50 +0000 (14:38 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:17:00 +0000 (10:17 +0200)
BugLink: http://bugs.launchpad.net/bugs/1685140
commit 05973c2efb40122f2a9ecde2d065f7ea5068d024 upstream.

This patch is simlar to one Dan Carpenter sent me, cleans
up some return codes and whitespace errors. There was one
place where he thought inserting an error message into
the ring buffer might be too chatty, I hope I convinced him
othewise. As a consolation <g> I changed a truly chatty
error message in another location into a debug message,
system-admins had already yelled at me about that one...

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/orangefs/devorangefs-req.c
fs/orangefs/orangefs-debugfs.c

index b0ced669427e154cc67c7b4b4f9e4630f934919f..c4ab6fdf17a01426db5d6e2bb9638130147bee61 100644 (file)
@@ -400,8 +400,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
        /* remove the op from the in progress hash table */
        op = orangefs_devreq_remove_op(head.tag);
        if (!op) {
-               gossip_err("WARNING: No one's waiting for tag %llu\n",
-                          llu(head.tag));
+               gossip_debug(GOSSIP_DEV_DEBUG,
+                            "%s: No one's waiting for tag %llu\n",
+                            __func__, llu(head.tag));
                return ret;
        }
 
index 27e75cf28b3a0c386c645bf714975c4772e14866..791912da97d7487d99c618ce8ac6f5fbe3cd11fb 100644 (file)
@@ -967,13 +967,13 @@ int orangefs_debugfs_new_client_string(void __user *arg)
        int ret;
 
        ret = copy_from_user(&client_debug_array_string,
-                                     (void __user *)arg,
-                                     ORANGEFS_MAX_DEBUG_STRING_LEN);
+                            (void __user *)arg,
+                            ORANGEFS_MAX_DEBUG_STRING_LEN);
 
        if (ret != 0) {
                pr_info("%s: CLIENT_STRING: copy_from_user failed\n",
                        __func__);
-               return -EIO;
+               return -EFAULT;
        }
 
        /*
@@ -988,17 +988,18 @@ int orangefs_debugfs_new_client_string(void __user *arg)
         */
        client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] =
                '\0';
-       
+
        pr_info("%s: client debug array string has been received.\n",
                __func__);
 
        if (!help_string_initialized) {
 
                /* Build a proper debug help string. */
-               if (orangefs_prepare_debugfs_help_string(0)) {
+               ret = orangefs_prepare_debugfs_help_string(0);
+               if (ret) {
                        gossip_err("%s: no debug help string \n",
                                   __func__);
-                       return -EIO;
+                       return ret;
                }
 
        }
@@ -1011,7 +1012,7 @@ int orangefs_debugfs_new_client_string(void __user *arg)
 
        help_string_initialized++;
 
-       return ret;
+       return 0;
 }
 
 int orangefs_debugfs_new_debug(void __user *arg)