From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@daterainc.com>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Quinn Tran <quinn.tran@qlogic.com>,
Himanshu Madhani <himanshu.madhani@qlogic.com>,
Sagi Grimberg <sagig@mellanox.com>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
Andy Grover <agrover@redhat.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: Re: [PATCH 2/2] target: Fix LUN_RESET active TMR descriptor handling
Date: Tue, 12 Jan 2016 16:25:13 +0100 [thread overview]
Message-ID: <20160112152513.GC2294@lst.de> (raw)
In-Reply-To: <1452594245-921-3-git-send-email-nab@daterainc.com>
> if (dev) {
> spin_lock_irqsave(&dev->se_tmr_lock, flags);
> - list_del(&tmr->tmr_list);
> + if (!list_empty(&tmr->tmr_list))
> + list_del_init(&tmr->tmr_list);
list_del_init on a empty list is fine.
> + sess = cmd->se_sess;
> + if (!sess) {
> + dump_stack();
> + continue;
> + }
Why not something like:
if (WARN_ON_ONCE(!sess))
continue;
same for the previous patch.
> + spin_lock(&sess->sess_cmd_lock);
> + rc = kref_get_unless_zero(&cmd->cmd_kref);
> + spin_unlock(&sess->sess_cmd_lock);
no need to take a lock around kref_get_unless_zero, it's not going to
help with anything.
next prev parent reply other threads:[~2016-01-12 15:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 10:24 [PATCH 0/2] target: Fix LUN_RESET active I/O + TMR handling Nicholas A. Bellinger
2016-01-12 10:24 ` [PATCH 1/2] target: Fix LUN_RESET active I/O handling for ACK_KREF Nicholas A. Bellinger
2016-01-12 15:20 ` Christoph Hellwig
2016-01-12 16:32 ` Bart Van Assche
2016-01-13 8:34 ` Christoph Hellwig
2016-01-13 9:14 ` Nicholas A. Bellinger
2016-01-13 9:29 ` Christoph Hellwig
2016-01-23 1:45 ` Nicholas A. Bellinger
2016-01-12 10:24 ` [PATCH 2/2] target: Fix LUN_RESET active TMR descriptor handling Nicholas A. Bellinger
2016-01-12 15:25 ` Christoph Hellwig [this message]
2016-01-23 2:02 ` Nicholas A. Bellinger
2016-01-13 20:26 ` [PATCH 0/2] target: Fix LUN_RESET active I/O + TMR handling Quinn Tran
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=20160112152513.GC2294@lst.de \
--to=hch@lst.de \
--cc=agrover@redhat.com \
--cc=hare@suse.de \
--cc=himanshu.madhani@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@daterainc.com \
--cc=nab@linux-iscsi.org \
--cc=quinn.tran@qlogic.com \
--cc=sagig@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.