staging: lustre: mgc: fix 'error handling' issues
authorSebastien Buisson <[email protected]>
Wed, 27 Apr 2016 22:21:03 +0000 (18:21 -0400)
committerGreg Kroah-Hartman <[email protected]>
Fri, 29 Apr 2016 04:51:58 +0000 (21:51 -0700)
Fix 'error handling' issues found by Coverity version 6.6.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.
Argument cannot be negative (NEGATIVE_RETURNS)
Negative value used as argument to a function expecting a
positive value.

Signed-off-by: Sebastien Buisson <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4055
Reviewed-on: http://review.whamcloud.com/7842
Reviewed-by: Dmitry Eremin <[email protected]>
Reviewed-by: James Nunez <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/staging/lustre/lustre/mgc/mgc_request.c

index 933f6f628350783684b7bf068bfc11b88c2237d4..2311a437c44194dc30ffbba65a154c7156f5d518 100644 (file)
@@ -502,8 +502,12 @@ static void do_requeue(struct config_llog_data *cld)
         */
        down_read(&cld->cld_mgcexp->exp_obd->u.cli.cl_sem);
        if (cld->cld_mgcexp->exp_obd->u.cli.cl_conn_count != 0) {
+               int rc;
+
                CDEBUG(D_MGC, "updating log %s\n", cld->cld_logname);
-               mgc_process_log(cld->cld_mgcexp->exp_obd, cld);
+               rc = mgc_process_log(cld->cld_mgcexp->exp_obd, cld);
+               if (rc && rc != -ENOENT)
+                       CERROR("failed processing log: %d\n", rc);
        } else {
                CDEBUG(D_MGC, "disconnecting, won't update log %s\n",
                       cld->cld_logname);