]> 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>
Fri, 2 Jan 2026 11:57:08 +0000 (12:57 +0100)
commitaceaa18f791add733b969f8b70fe614a3e43f183
tree59a03caac7b3d049982a65d3d1fcd37ca157dd53
parent3b95fdb75d74c9bc4aee5868f7b3499af00c1632
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