Commit be595d15 authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Linus Torvalds

[PATCH] JFS: Avoid segfault when dirty inodes are written on readonly mount

This fixes an oops that can occur if JFS is used as the root filesystem.

Writes to a device node may cause a ->write_inode to be called during a
read-only mount.  JFS needs to check for NULL log in jfs_flush_journal. 
parent e1d592cd
......@@ -1415,6 +1415,10 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
int i;
struct tblock *target;
/* jfs_write_inode may call us during read-only mount */
if (!log)
return;
jfs_info("jfs_flush_journal: log:0x%p wait=%d", log, wait);
LOGGC_LOCK(log);
......
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