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>
         */
 }
 
-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
  */
        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;