Skip to content
Commit 3bfc3bcd authored by Logan Gunthorpe's avatar Logan Gunthorpe Committed by Song Liu
Browse files

md: Remove extra mddev_get() in md_seq_start()



A regression is seen where mddev devices stay permanently after they
are stopped due to an elevated reference count.

This was tracked down to an extra mddev_get() in md_seq_start().

It only happened rarely because most of the time the md_seq_start()
is called with a zero offset. The path with an extra mddev_get() only
happens when it starts with a non-zero offset.

The commit noted below changed an mddev_get() to check its success
but inadvertently left the original call in. Remove the extra call.

Fixes: 12a6caf2 ("md: only delete entries from all_mddevs when the disk is freed")
Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarGuoqing Jiang <Guoqing.jiang@linux.dev>
Signed-off-by: default avatarSong Liu <song@kernel.org>
parent c66a6f41
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment