Commit f5db130d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

ext4: wire up sops->shutdown

Wire up the shutdown method to shut down the file system when the
underlying block device is marked dead.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Acked-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Link: https://lore.kernel.org/r/20230601094459.1350643-16-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 97524b45
...@@ -1450,6 +1450,11 @@ static void ext4_destroy_inode(struct inode *inode) ...@@ -1450,6 +1450,11 @@ static void ext4_destroy_inode(struct inode *inode)
EXT4_I(inode)->i_reserved_data_blocks); EXT4_I(inode)->i_reserved_data_blocks);
} }
static void ext4_shutdown(struct super_block *sb)
{
ext4_force_shutdown(sb, EXT4_GOING_FLAGS_NOLOGFLUSH);
}
static void init_once(void *foo) static void init_once(void *foo)
{ {
struct ext4_inode_info *ei = foo; struct ext4_inode_info *ei = foo;
...@@ -1610,6 +1615,7 @@ static const struct super_operations ext4_sops = { ...@@ -1610,6 +1615,7 @@ static const struct super_operations ext4_sops = {
.unfreeze_fs = ext4_unfreeze, .unfreeze_fs = ext4_unfreeze,
.statfs = ext4_statfs, .statfs = ext4_statfs,
.show_options = ext4_show_options, .show_options = ext4_show_options,
.shutdown = ext4_shutdown,
#ifdef CONFIG_QUOTA #ifdef CONFIG_QUOTA
.quota_read = ext4_quota_read, .quota_read = ext4_quota_read,
.quota_write = ext4_quota_write, .quota_write = ext4_quota_write,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment