summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-08-02 18:41:29 +0300
committerChristian Brauner <brauner@kernel.org>2023-08-11 14:15:04 +0300
commit8bed1783751fc8d0a5a263dcf87838a2fa570953 (patch)
tree99fc1eb77e842dc07facb8ae1bb63033bededf6a /fs/ext4
parent6f5fc7de98857c75dad05e9f3fe2e6f358d4583e (diff)
downloadlinux-8bed1783751fc8d0a5a263dcf87838a2fa570953.tar.xz
ext4: use fs_holder_ops for the log device
Use the generic fs_holder_ops to shut down the file system when the log device goes away instead of duplicating the logic. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230802154131.2221419-11-hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 47e3272e0c5b..60d2815a0b7e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1097,15 +1097,6 @@ void ext4_update_dynamic_rev(struct super_block *sb)
*/
}
-static void ext4_bdev_mark_dead(struct block_device *bdev)
-{
- ext4_force_shutdown(bdev->bd_holder, EXT4_GOING_FLAGS_NOLOGFLUSH);
-}
-
-static const struct blk_holder_ops ext4_holder_ops = {
- .mark_dead = ext4_bdev_mark_dead,
-};
-
/*
* Open the external journal device
*/
@@ -1114,7 +1105,7 @@ static struct block_device *ext4_blkdev_get(dev_t dev, struct super_block *sb)
struct block_device *bdev;
bdev = blkdev_get_by_dev(dev, BLK_OPEN_READ | BLK_OPEN_WRITE, sb,
- &ext4_holder_ops);
+ &fs_holder_ops);
if (IS_ERR(bdev))
goto fail;
return bdev;