On 2020/11/24 21:27, Christoph Hellwig wrote:
Now that the hd_struct always has a block device attached to it, there is
no need for having two size field that just get out of sync.
Additional the field in hd_struct did not use proper serializiation,
possibly allowing for torn writes. By only using the block_device field
this problem also gets fixed.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
block/bio.c | 4 +-
block/blk-core.c | 2 +-
block/blk.h | 53 ----------------------
block/genhd.c | 55 +++++++++++-----------
block/partitions/core.c | 17 ++++---
drivers/block/loop.c | 1 -
drivers/block/nbd.c | 2 +-
drivers/block/xen-blkback/common.h | 4 +-
drivers/md/bcache/super.c | 2 +-
drivers/s390/block/dasd_ioctl.c | 4 +-
drivers/target/target_core_pscsi.c | 7 +--
fs/block_dev.c | 73 +-----------------------------
fs/f2fs/super.c | 2 +-
For f2fs part,
Acked-by: Chao Yu <yuch...@huawei.com>
Thanks,
fs/pstore/blk.c | 2 +-
include/linux/genhd.h | 29 +++---------
kernel/trace/blktrace.c | 2 +-
16 files changed, 60 insertions(+), 199 deletions(-)