Amir Goldstein db6516a5e7 ext4: do not update s_last_mounted of a frozen fs
If fs is frozen after mount and before the first file open, the
update of s_last_mounted bypasses freeze protection and prints out
a WARNING splat:

$ mount /vdf
$ fsfreeze -f /vdf
$ cat /vdf/foo

[   31.578555] WARNING: CPU: 1 PID: 1415 at
fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82

[   31.614016] Call Trace:
[   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
[   31.616771]  ? ext4_file_open+0xb6/0x189
[   31.618094]  ext4_file_open+0xb6/0x189

If fs is frozen, skip s_last_mounted update.

[backport hint: to apply to stable tree, need to apply also patches
 vfs: add the sb_start_intwrite_trylock() helper
 ext4: factor out helper ext4_sample_last_mounted()]

Cc: stable@vger.kernel.org
Fixes: bc0b0d6d69ee ("ext4: update the s_last_mounted field in the superblock")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
2018-05-13 22:54:44 -04:00
..
2018-04-07 09:08:24 -07:00
2018-04-20 09:59:33 -07:00
2018-05-04 20:32:18 -10:00
2018-05-04 20:51:10 -10:00
2018-03-14 13:31:23 +01:00
\n
2018-04-20 09:01:26 -07:00
2018-04-11 10:28:39 -07:00
2018-03-27 13:18:09 -04:00
2018-04-12 12:55:50 -07:00
2018-04-03 16:27:08 -04:00
2018-04-11 10:28:39 -07:00
2018-04-20 17:18:36 -07:00
2018-02-07 14:25:22 -08:00
2018-04-10 10:25:57 -07:00
2018-04-11 10:28:39 -07:00
2018-04-11 10:28:37 -07:00
2017-12-07 14:23:30 -05:00
2018-05-03 16:11:37 -06:00
2018-04-11 10:28:39 -07:00
2018-01-29 07:27:24 -08:00
2018-02-06 10:41:33 -08:00
2018-02-15 15:34:42 -05:00
2018-04-04 12:44:02 -07:00