]> www.infradead.org Git - users/jedix/linux-maple.git/commit
md: clean up invalid BUG_ON in md_ioctl
authorLi Nan <linan122@huawei.com>
Mon, 26 Feb 2024 03:14:38 +0000 (11:14 +0800)
committerSong Liu <song@kernel.org>
Mon, 26 Feb 2024 18:22:22 +0000 (10:22 -0800)
commit9dd8702e7cd28ebf076ff838933f29cf671165ec
tree7d46656150025bd4f0146218ca79be7e137e5a9e
parent4e26593944e02446a75d911e11b759a9320c8273
md: clean up invalid BUG_ON in md_ioctl

'disk->private_data' is set to mddev in md_alloc() and never set to NULL,
and users need to open mddev before submitting ioctl. So mddev must not
have been freed during ioctl, and there is no need to check mddev here.
Clean up it.

Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240226031444.3606764-4-linan666@huaweicloud.com
drivers/md/md.c