diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-12 01:18:24 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-02 19:50:29 -0400 |
commit | 4c80105e3909b3aff634a40daa9c29059ce03d6a (patch) | |
tree | ea61d297178c95f5af58c8349b251c8ff3b2a7a0 /block | |
parent | 01e198f01d55880b79d8f5ac73064ff30a89d98a (diff) | |
download | linux-4c80105e3909b3aff634a40daa9c29059ce03d6a.tar.gz linux-4c80105e3909b3aff634a40daa9c29059ce03d6a.tar.bz2 linux-4c80105e3909b3aff634a40daa9c29059ce03d6a.zip |
bdev: move ->bd_write_holder into ->__bd_flags
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block')
-rw-r--r-- | block/bdev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/block/bdev.c b/block/bdev.c index 2ec223315500..9df9a59f0900 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -624,7 +624,7 @@ static void bd_end_claim(struct block_device *bdev, void *holder) bdev->bd_holder = NULL; bdev->bd_holder_ops = NULL; mutex_unlock(&bdev->bd_holder_lock); - if (bdev->bd_write_holder) + if (bdev_test_flag(bdev, BD_WRITE_HOLDER)) unblock = true; } if (!whole->bd_holders) @@ -640,7 +640,7 @@ static void bd_end_claim(struct block_device *bdev, void *holder) */ if (unblock) { disk_unblock_events(bdev->bd_disk); - bdev->bd_write_holder = false; + bdev_clear_flag(bdev, BD_WRITE_HOLDER); } } @@ -892,9 +892,10 @@ int bdev_open(struct block_device *bdev, blk_mode_t mode, void *holder, * writeable reference is too fragile given the way @mode is * used in blkdev_get/put(). */ - if ((mode & BLK_OPEN_WRITE) && !bdev->bd_write_holder && + if ((mode & BLK_OPEN_WRITE) && + !bdev_test_flag(bdev, BD_WRITE_HOLDER) && (disk->event_flags & DISK_EVENT_FLAG_BLOCK_ON_EXCL_WRITE)) { - bdev->bd_write_holder = true; + bdev_set_flag(bdev, BD_WRITE_HOLDER); unblock_events = false; } } |