All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhong Jinghua <zhongjinghua@huawei.com>
To: <gregkh@linuxfoundation.org>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>, <hare@suse.de>,
	<bvanassche@acm.org>, <emilne@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
	<zhongjinghua@huawei.com>, <yi.zhang@huawei.com>,
	<yukuai3@huawei.com>
Subject: [PATCH-next v2 0/2] scsi, driver core: fix iscsi rescan fails to create block device
Date: Sat, 28 Jan 2023 17:41:44 +0800	[thread overview]
Message-ID: <20230128094146.205858-1-zhongjinghua@huawei.com> (raw)

v1->v2: add a new patch that introduces get_device_unless_zero() method.

Hello, This patchset introduces get_device_unless_zero() method, Avoid
dev's reference count from 0 to 1, as this will cause bugs in some parts
of the kernel. 

We used this method when we fixed an issue with iSCSI delete order.
Zhong Jinghua (2):
  driver core: introduce get_device_unless_zero()
  scsi: fix iscsi rescan fails to create block device

 drivers/base/core.c       | 8 ++++++++
 drivers/scsi/scsi_sysfs.c | 4 +---
 include/linux/device.h    | 1 +
 3 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.31.1


             reply	other threads:[~2023-01-28  9:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  9:41 Zhong Jinghua [this message]
2023-01-28  9:41 ` [PATCH-next v2 1/2] driver core: introduce get_device_unless_zero() Zhong Jinghua
2023-01-28 10:43   ` Greg KH
2023-01-28  9:41 ` [PATCH-next v2 2/2] scsi: fix iscsi rescan fails to create block device Zhong Jinghua
2023-01-28 10:45   ` Greg KH
2023-01-29  1:13     ` Yu Kuai
2023-01-29  6:46       ` Greg KH
2023-01-29  6:55         ` Yu Kuai
2023-01-29 17:30   ` James Bottomley
2023-01-30  3:07     ` Yu Kuai
2023-01-30  3:29       ` James Bottomley
2023-01-30  3:46         ` Yu Kuai
2023-01-30 13:17           ` James Bottomley
2023-01-31  1:43             ` Yu Kuai
2023-01-31  3:25               ` James Bottomley

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=20230128094146.205858-1-zhongjinghua@huawei.com \
    --to=zhongjinghua@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=emilne@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hare@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /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.