|
|
@@ -4808,6 +4808,14 @@ static int ext4_commit_super(struct super_block *sb, int sync)
|
|
|
|
|
|
if (!sbh || block_device_ejected(sb))
|
|
|
return error;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * The superblock bh should be mapped, but it might not be if the
|
|
|
+ * device was hot-removed. Not much we can do but fail the I/O.
|
|
|
+ */
|
|
|
+ if (!buffer_mapped(sbh))
|
|
|
+ return error;
|
|
|
+
|
|
|
/*
|
|
|
* If the file system is mounted read-only, don't update the
|
|
|
* superblock write time. This avoids updating the superblock
|