aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/super.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b37b00befd65..f36c9f774e83 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4808,6 +4808,14 @@ static int ext4_commit_super(struct super_block *sb, int sync)
4808 4808
4809 if (!sbh || block_device_ejected(sb)) 4809 if (!sbh || block_device_ejected(sb))
4810 return error; 4810 return error;
4811
4812 /*
4813 * The superblock bh should be mapped, but it might not be if the
4814 * device was hot-removed. Not much we can do but fail the I/O.
4815 */
4816 if (!buffer_mapped(sbh))
4817 return error;
4818
4811 /* 4819 /*
4812 * If the file system is mounted read-only, don't update the 4820 * If the file system is mounted read-only, don't update the
4813 * superblock write time. This avoids updating the superblock 4821 * superblock write time. This avoids updating the superblock