staging/lustre: LDLM_DEBUG() shouldn't be passed \n
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Mon, 20 Jun 2016 20:55:36 +0000 (16:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jun 2016 21:28:39 +0000 (14:28 -0700)
as it adds own \n, so any extra \n break log format.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/17494
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7521
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
drivers/staging/lustre/lustre/ldlm/ldlm_request.c
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
drivers/staging/lustre/lustre/lov/lov_object.c
drivers/staging/lustre/lustre/mdc/mdc_locks.c
drivers/staging/lustre/lustre/osc/osc_cache.c
drivers/staging/lustre/lustre/osc/osc_lock.c

index 1ecdfa2..b7254eb 100644 (file)
@@ -1440,7 +1440,7 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
                memcpy(data, lvb, size);
                break;
        default:
-               LDLM_ERROR(lock, "Unknown LVB type: %d\n", lock->l_lvb_type);
+               LDLM_ERROR(lock, "Unknown LVB type: %d", lock->l_lvb_type);
                dump_stack();
                return -EINVAL;
        }
index 3eab059..8294703 100644 (file)
@@ -637,7 +637,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req)
                 */
                if ((ldlm_is_canceling(lock) && ldlm_is_bl_done(lock)) ||
                    ldlm_is_failed(lock)) {
-                       LDLM_DEBUG(lock, "callback on lock %#llx - lock disappeared\n",
+                       LDLM_DEBUG(lock,
+                                  "callback on lock %#llx - lock disappeared",
                                   dlm_req->lock_handle[0].cookie);
                        unlock_res_and_lock(lock);
                        LDLM_LOCK_RELEASE(lock);
index 471ab08..d3a376e 100644 (file)
@@ -711,7 +711,7 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
 
                        lock->l_req_extent = policy->l_extent;
                }
-               LDLM_DEBUG(lock, "client-side enqueue START, flags %llx\n",
+               LDLM_DEBUG(lock, "client-side enqueue START, flags %llx",
                           *flags);
        }
 
index f7c95b7..51a28d9 100644 (file)
@@ -1275,7 +1275,7 @@ void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head,
 {
        check_res_locked(res);
 
-       LDLM_DEBUG(lock, "About to add this lock:\n");
+       LDLM_DEBUG(lock, "About to add this lock:");
 
        if (ldlm_is_destroyed(lock)) {
                CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n");
index ec55b88..f9621b0 100644 (file)
@@ -181,8 +181,8 @@ static int lov_init_sub(const struct lu_env *env, struct lov_object *lov,
                }
 
                LU_OBJECT_DEBUG(mask, env, &stripe->co_lu,
-                               "stripe %d is already owned.\n", idx);
-               LU_OBJECT_DEBUG(mask, env, old_obj, "owned.\n");
+                               "stripe %d is already owned.", idx);
+               LU_OBJECT_DEBUG(mask, env, old_obj, "owned.");
                LU_OBJECT_HEADER(mask, env, lov2lu(lov), "try to own.\n");
                cl_object_put(env, stripe);
        }
index d55a5d8..b154aff 100644 (file)
@@ -692,7 +692,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
        if (lock && ldlm_has_layout(lock) && lvb_data) {
                void *lmm;
 
-               LDLM_DEBUG(lock, "layout lock returned by: %s, lvb_len: %d\n",
+               LDLM_DEBUG(lock, "layout lock returned by: %s, lvb_len: %d",
                           ldlm_it2str(it->it_op), lvb_len);
 
                lmm = libcfs_kvzalloc(lvb_len, GFP_NOFS);
index 4c78b53..d1a7d6b 100644 (file)
@@ -123,9 +123,9 @@ static const char *oes_strings[] = {
                /* ----- part 4 ----- */                                      \
                ## __VA_ARGS__);                                              \
        if (lvl == D_ERROR && __ext->oe_dlmlock)                              \
-               LDLM_ERROR(__ext->oe_dlmlock, "extent: %p\n", __ext);         \
+               LDLM_ERROR(__ext->oe_dlmlock, "extent: %p", __ext);           \
        else                                                                  \
-               LDLM_DEBUG(__ext->oe_dlmlock, "extent: %p\n", __ext);         \
+               LDLM_DEBUG(__ext->oe_dlmlock, "extent: %p", __ext);           \
 } while (0)
 
 #undef EASSERTF
index 5455d9d..717d3ff 100644 (file)
@@ -1168,7 +1168,7 @@ int osc_lock_init(const struct lu_env *env,
                osc_lock_set_writer(env, io, obj, oscl);
 
 
-       LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx\n",
+       LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx",
                          lock, oscl, oscl->ols_flags);
 
        return 0;