Commit a662f3c
jbd2: do not try to recover wiped journal
If a journal is wiped, we will set journal->j_tail to 0. However if
'write' argument is not set (as it happens for read-only device or for
ocfs2), the on-disk superblock is not updated accordingly and thus
jbd2_journal_recover() cat try to recover the wiped journal. Fix the
check in jbd2_journal_recover() to use journal->j_tail for checking
empty journal instead.
Signed-off-by: Jan Kara <[email protected]>
Reviewed-by: Zhang Yi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>1 parent e6eff39 commit a662f3c
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
291 | 288 | | |
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
295 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
296 | 295 | | |
297 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| |||
0 commit comments