Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308178
| From | "Nicholas A. Bellinger" <nab@linux-iscsi.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage |
| Date | 2016-01-13 10:00 +0100 |
| Message-ID | <qQprz-5DL-1@gated-at.bofh.it> (permalink) |
| References | <qPuWm-F7-17@gated-at.bofh.it> <qPuWn-F7-31@gated-at.bofh.it> <qQ8K6-2Id-15@gated-at.bofh.it> <qQoc9-4Nw-7@gated-at.bofh.it> <qQoYy-5ni-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 2016-01-13 at 09:24 +0100, Christoph Hellwig wrote:
> On Tue, Jan 12, 2016 at 11:29:32PM -0800, Nicholas A. Bellinger wrote:
> > With this patch in place, this function is now also called by
> > core_tpg_set_initiator_node_queue_depth(), where previously it was
> > called only during target_alloc_node_acl().
> >
> > Might as well drop the ignored return while we're at it..
>
> Please add it to the patch description..
>
Done.
> > > > + continue;
> > > > + }
> > > > + target_put_session(sess);
> > > > + spin_lock_irqsave(&acl->nacl_sess_lock, flags);
> > > > }
> > > > + spin_unlock_irqrestore(&acl->nacl_sess_lock, flags);
> > >
> > > It seems at thus point there is no need for ->shutdown_session, it
> > > could be folded into ->close_session in a follow on patch.
> > >
> >
> > Not exactly.
> >
> > It's the final target_put_session() -> kref_put() upon
> > se_sess->sess_kref that invokes TFO->close_session().
>
> I know. But we are dropping the only long term held reference
> here, so the two are more or less equivalent.
No. If ->shutdown_session() succeeds, then target-core is
responsible for dropping both references.
> > > > -void target_get_session(struct se_session *se_sess)
> > > > +int target_get_session(struct se_session *se_sess)
> > > > {
> > > > - kref_get(&se_sess->sess_kref);
> > > > + return kref_get_unless_zero(&se_sess->sess_kref);
> > > > }
> > > > EXPORT_SYMBOL(target_get_session);
> > >
> > > I'd be much happier to have a separate prep patch for this..
> >
> > Since this will need to hit stable at some point, it likely needs to
> > stay with the original bug-fix.
>
> Please at least document it in the patch description. I'd still
> be happier to have the change to target_get_session as a preparatory
> patch, though.
Done.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH-v2 0/4] target: Close se_node_acl lookup race "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-10 21:40 +0100
[PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-10 21:40 +0100
Re: [PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-12 16:10 +0100
Re: [PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-13 09:10 +0100
Re: [PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-13 09:20 +0100
Re: [PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-13 09:40 +0100
Re: [PATCH-v2 4/4] target: Obtain se_node_acl->acl_kref during get_initiator_node_acl Christoph Hellwig <hch@lst.de> - 2016-01-13 09:50 +0100
[PATCH-v2 1/4] tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-10 21:40 +0100
Re: [PATCH-v2 1/4] tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage Christoph Hellwig <hch@lst.de> - 2016-01-12 16:10 +0100
Re: [PATCH-v2 1/4] tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-13 08:20 +0100
[PATCH-v2 3/4] target: Fix change depth se_session reference usage "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-10 21:40 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage Christoph Hellwig <hch@lst.de> - 2016-01-12 16:10 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-13 08:40 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage Christoph Hellwig <hch@lst.de> - 2016-01-13 09:30 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-13 10:00 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage Christoph Hellwig <hch@lst.de> - 2016-01-13 09:30 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2016-01-13 10:00 +0100
Re: [PATCH-v2 3/4] target: Fix change depth se_session reference usage Sagi Grimberg <sagig@dev.mellanox.co.il> - 2016-01-13 17:50 +0100
[PATCH-v2 2/4] ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage "Nicholas A. Bellinger" <nab@daterainc.com> - 2016-01-10 21:40 +0100
Re: [PATCH-v2 2/4] ib_srpt: Convert acl lookup to modern get_initiator_node_acl usage Sagi Grimberg <sagig@dev.mellanox.co.il> - 2016-01-13 17:40 +0100
csiph-web