Minor logging changes

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3449 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-05-11 16:28:41 +00:00
parent 570be3dce6
commit 02aced3f19

View File

@@ -2460,6 +2460,11 @@ static int dev_user_task_mgmt_fn(struct scst_mgmt_cmd *mcmd,
/* We can't afford missing TM command due to memory shortage */
ucmd = dev_user_alloc_ucmd(dev, GFP_ATOMIC|__GFP_NOFAIL);
if (ucmd == NULL) {
PRINT_CRIT_ERROR("Unable to allocate TM %d message "
"(dev %s)", mcmd->fn, dev->name);
goto out;
}
ucmd->user_cmd_payload_len =
offsetof(struct scst_user_get_cmd, tm_cmd) +
@@ -2489,6 +2494,7 @@ static int dev_user_task_mgmt_fn(struct scst_mgmt_cmd *mcmd,
dev_user_add_to_ready(ucmd);
out:
TRACE_EXIT();
return SCST_DEV_TM_NOT_COMPLETED;
}
@@ -2677,12 +2683,15 @@ static void dev_user_detach_tgt(struct scst_tgt_dev *tgt_dev)
TRACE_ENTRY();
/*
* We can't miss TM command due to memory shortage, because it might
* We can't miss detach command due to memory shortage, because it might
* lead to a memory leak in the user space handler.
*/
ucmd = dev_user_alloc_ucmd(dev, GFP_KERNEL|__GFP_NOFAIL);
if (ucmd == NULL)
if (ucmd == NULL) {
PRINT_CRIT_ERROR("Unable to allocate DETACH_SESS message "
"(dev %s)", dev->name);
goto out;
}
TRACE_MGMT_DBG("Preparing DETACH_SESS %p (h %d, sess_h %llx)", ucmd,
ucmd->h, ucmd->user_cmd.sess.sess_h);