<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div style="line-height:1.6;font-family:'苹方','微软雅黑','sans-serif';">thanks Hellwig for your kindly reply and your fix and add report by me :)<br><br></div><div class="ne-quoted"><blockquote id="ntes-andriodmail-quote" style="margin:0px !important;padding:0px !important;border: none !important;"><div class="J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;">
    <div style="font-size:14px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On <span class="mail-date">08/21/2020 17:26</span>, <a class="mail-to" style="text-decoration:none;color:#2a97ff;" href="mailto:hare@suse.de">Hannes Reinecke</a> wrote:</div>
</div>On 8/21/20 10:56 AM, Christoph Hellwig wrote:
<br>> Two different callers use two different mutexes for updating the
<br>> block device size, which obviously doesn't help to actually protect
<br>> against concurrent updates from the different callers.  In addition
<br>> one of the locks, bd_mutex is rather prone to deadlocks with other
<br>> parts of the block stack that use it for high level synchronization.
<br>> 
<br>> Switch to using a new spinlock protecting just the size updates, as
<br>> that is all we need, and make sure everyone does the update through
<br>> the proper helper.
<br>> 
<br>> This fixeѕ a bug reported with the nvme revalidating disks during a
<br>> hot removal operation.
<br>> 
<br>> Reported-by: Xianting Tian <xianting_tian@126.com>
<br>> Signed-off-by: Christoph Hellwig <hch@lst.de>
<br>> ---
<br>>  block/partitions/core.c         |  4 ++--
<br>>  drivers/block/aoe/aoecmd.c      |  4 +---
<br>>  drivers/md/dm.c                 | 15 ++-------------
<br>>  drivers/s390/block/dasd_ioctl.c |  9 ++-------
<br>>  fs/block_dev.c                  | 18 +++++++++---------
<br>>  include/linux/blk_types.h       |  1 +
<br>>  6 files changed, 17 insertions(+), 34 deletions(-)
<br>> 
<br>Reviewed-by: Hannes Reinecke <hare@suse.de>
<br>
<br>Cheers,
<br>
<br>Hannes
<br>-- 
<br>Dr. Hannes Reinecke                     Kernel Storage Architect
<br>hare@suse.de                                 +49 911 74053 688
<br>SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
<br>HRB 36809 (AG Nürnberg), GF: Felix Imendörffer
<br></blockquote></div>
</body>
</html>