Commit a9f1ac69 authored by Dave Kleikamp's avatar Dave Kleikamp

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

Writes to a device 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 a3d93eb3
......@@ -1415,6 +1415,10 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
int i;
struct tblock *target;
if (!log)
/* jfs_write_inode may call us during read-only mount */
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