]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/dasd: Fix gendisk parent after copy pair swap
authorStefan Haberland <sth@linux.ibm.com>
Wed, 26 Nov 2025 16:06:31 +0000 (17:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:14 +0000 (10:14 +0100)
commitbfe512fb5b68e7b90239eb7971ec8ff7b84bb57c
tree5c038d58063ca1de4168b94761145ecfc5947f9d
parent129b3bc14901149ccd37249bd56fd27fcf2c76a8
s390/dasd: Fix gendisk parent after copy pair swap

commit c943bfc6afb8d0e781b9b7406f36caa8bbf95cb9 upstream.

After a copy pair swap the block device's "device" symlink points to
the secondary CCW device, but the gendisk's parent remained the
primary, leaving /sys/block/<dasdx> under the wrong parent.

Move the gendisk to the secondary's device with device_move(), keeping
the sysfs topology consistent after the swap.

Fixes: 413862caad6f ("s390/dasd: add copy pair swap capability")
Cc: stable@vger.kernel.org #6.1
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/block/dasd_eckd.c