aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2017-02-09 14:38:50 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 01:11:46 -0400
commit1b9921866dc5b7d1a1bfdc6236e671ca59d61623 (patch)
tree059596318b9886a725af9cc0568cb0ff5999fee2
parentdcac0d18e7e1ee4ae524ae9c672a35b86189a260 (diff)
orangefs: Dan Carpenter influenced cleanups...
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>
-rw-r--r--fs/orangefs/devorangefs-req.c5
-rw-r--r--fs/orangefs/orangefs-debugfs.c15
2 files changed, 11 insertions, 9 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index 516ffb4dc9a0..f419dd999581 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -402,8 +402,9 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
402 /* remove the op from the in progress hash table */ 402 /* remove the op from the in progress hash table */
403 op = orangefs_devreq_remove_op(head.tag); 403 op = orangefs_devreq_remove_op(head.tag);
404 if (!op) { 404 if (!op) {
405 gossip_err("WARNING: No one's waiting for tag %llu\n", 405 gossip_debug(GOSSIP_DEV_DEBUG,
406 llu(head.tag)); 406 "%s: No one's waiting for tag %llu\n",
407 __func__, llu(head.tag));
407 return ret; 408 return ret;
408 } 409 }
409 410
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index b5dbc9c6530c..0748a26598fc 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -965,13 +965,13 @@ int orangefs_debugfs_new_client_string(void __user *arg)
965 int ret; 965 int ret;
966 966
967 ret = copy_from_user(&client_debug_array_string, 967 ret = copy_from_user(&client_debug_array_string,
968 (void __user *)arg, 968 (void __user *)arg,
969 ORANGEFS_MAX_DEBUG_STRING_LEN); 969 ORANGEFS_MAX_DEBUG_STRING_LEN);
970 970
971 if (ret != 0) { 971 if (ret != 0) {
972 pr_info("%s: CLIENT_STRING: copy_from_user failed\n", 972 pr_info("%s: CLIENT_STRING: copy_from_user failed\n",
973 __func__); 973 __func__);
974 return -EIO; 974 return -EFAULT;
975 } 975 }
976 976
977 /* 977 /*
@@ -986,17 +986,18 @@ int orangefs_debugfs_new_client_string(void __user *arg)
986 */ 986 */
987 client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] = 987 client_debug_array_string[ORANGEFS_MAX_DEBUG_STRING_LEN - 1] =
988 '\0'; 988 '\0';
989 989
990 pr_info("%s: client debug array string has been received.\n", 990 pr_info("%s: client debug array string has been received.\n",
991 __func__); 991 __func__);
992 992
993 if (!help_string_initialized) { 993 if (!help_string_initialized) {
994 994
995 /* Build a proper debug help string. */ 995 /* Build a proper debug help string. */
996 if (orangefs_prepare_debugfs_help_string(0)) { 996 ret = orangefs_prepare_debugfs_help_string(0);
997 if (ret) {
997 gossip_err("%s: no debug help string \n", 998 gossip_err("%s: no debug help string \n",
998 __func__); 999 __func__);
999 return -EIO; 1000 return ret;
1000 } 1001 }
1001 1002
1002 } 1003 }
@@ -1009,7 +1010,7 @@ int orangefs_debugfs_new_client_string(void __user *arg)
1009 1010
1010 help_string_initialized++; 1011 help_string_initialized++;
1011 1012
1012 return ret; 1013 return 0;
1013} 1014}
1014 1015
1015int orangefs_debugfs_new_debug(void __user *arg) 1016int orangefs_debugfs_new_debug(void __user *arg)