diff options
author | Ming Lei <ming.lei@redhat.com> | 2020-05-08 10:17:56 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-13 04:31:39 +0200 |
commit | 07c4e1e834f8e7c991aa6dcb5ee0b7f2842e495d (patch) | |
tree | 0c1fd4194b7af7d096e73834fde80cce5bb4ba64 /block/partitions | |
parent | block: fix use-after-free on cached last_lookup partition (diff) | |
download | linux-07c4e1e834f8e7c991aa6dcb5ee0b7f2842e495d.tar.xz linux-07c4e1e834f8e7c991aa6dcb5ee0b7f2842e495d.zip |
block: only define 'nr_sects_seq' in hd_part for 32bit SMP
The seqcount of 'nr_sects_seq' is only needed in case of 32bit SMP,
so define it just for 32bit SMP.
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Cc: Yufen Yu <yuyufen@huawei.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hou Tao <houtao1@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/partitions')
-rw-r--r-- | block/partitions/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c index 8d8c87207fc2..297004fd2264 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -392,7 +392,7 @@ static struct hd_struct *add_partition(struct gendisk *disk, int partno, goto out_free; } - seqcount_init(&p->nr_sects_seq); + hd_sects_seq_init(p); pdev = part_to_dev(p); p->start_sect = start; |