From: Christoph Hellwig <hch@infradead.org>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Roland Dreier <roland@purestorage.com>,
Andy Grover <agrover@redhat.com>
Subject: Re: [PATCH 1/4] target: Prevent cmd->se_queue_node double add
Date: Sat, 8 Oct 2011 21:24:14 -0400 [thread overview]
Message-ID: <20111009012414.GA32104@infradead.org> (raw)
In-Reply-To: <1317358511-10664-2-git-send-email-nab@linux-iscsi.org>
> + /* If the cmd is already on the list, remove it before we add it */
> + if (!list_empty(&cmd->se_queue_node))
> + list_del(&cmd->se_queue_node);
> + else
> + atomic_inc(&qobj->queue_cnt);
> +
This is not an overly useful comment, as it states the obvious, aka what
we are doing here. It is much better to explain why the semingly
unexpected (re-adding the same cmd) might be valid under certain
circumstances. Even better would be asserts that we only do it under
those circumstances.
next prev parent reply other threads:[~2011-10-09 1:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 4:55 [PATCH 0/4] target: LUN_RESET bugfixes for HW target mode Nicholas A. Bellinger
2011-09-30 4:55 ` [PATCH 1/4] target: Prevent cmd->se_queue_node double add Nicholas A. Bellinger
2011-10-09 1:24 ` Christoph Hellwig [this message]
2011-09-30 4:55 ` [PATCH 2/4] target: Re-org of core_tmr_lun_reset + FREE_CMD_INTR bugfix Nicholas A. Bellinger
2011-10-09 1:30 ` Christoph Hellwig
2011-10-09 2:00 ` Nicholas A. Bellinger
2011-09-30 4:55 ` [PATCH 3/4] target: Fix transport_cmd_finish_abort queue removal bug Nicholas A. Bellinger
2011-10-09 1:33 ` Christoph Hellwig
2011-10-09 2:03 ` Nicholas A. Bellinger
2011-10-09 2:27 ` Christoph Hellwig
2011-10-09 9:06 ` Nicholas A. Bellinger
2011-09-30 4:55 ` [PATCH 4/4] target: Prevent transport_send_task_abort when CHECK_CONDITION status Nicholas A. Bellinger
2011-09-30 5:25 ` [PATCH 0/4] target: LUN_RESET bugfixes for HW target mode Nicholas A. Bellinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111009012414.GA32104@infradead.org \
--to=hch@infradead.org \
--cc=agrover@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=roland@purestorage.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox