diff options
author | Mike Snitzer <snitzer@redhat.com> | 2020-09-29 16:27:21 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-09-29 16:31:35 -0400 |
commit | 1471308fb5ec4335f9ae9fc65f65048dbe7c336e (patch) | |
tree | 69aef90f47105e1c730e5277f352d3d5446a1174 /drivers/block/loop.c | |
parent | 4c07ae0ad493b7b2d3dd3e53870e594f136ce8a5 (diff) | |
parent | 76cffccd606acffde1b91e8b029b39b5fd1a3117 (diff) | |
download | linux-1471308fb5ec4335f9ae9fc65f65048dbe7c336e.tar.bz2 |
Merge remote-tracking branch 'jens/for-5.10/block' into dm-5.10
DM depends on these block 5.10 commits:
22ada802ede8 block: use lcm_not_zero() when stacking chunk_sectors
07d098e6bbad block: allow 'chunk_sectors' to be non-power-of-2
021a24460dc2 block: add QUEUE_FLAG_NOWAIT
6abc49468eea dm: add support for REQ_NOWAIT and enable it for linear target
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index d3394191e168..cb1191d6e945 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -253,7 +253,7 @@ static void loop_set_size(struct loop_device *lo, loff_t size) { struct block_device *bdev = lo->lo_device; - bd_set_size(bdev, size << SECTOR_SHIFT); + bd_set_nr_sectors(bdev, size); set_capacity_revalidate_and_notify(lo->lo_disk, size, false); } @@ -1251,7 +1251,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) set_capacity(lo->lo_disk, 0); loop_sysfs_exit(lo); if (bdev) { - bd_set_size(bdev, 0); + bd_set_nr_sectors(bdev, 0); /* let user-space know about this change */ kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE); } |