[LogFS] Only write journal if dirty

This prevents unnecessary journal writes.  More importantly it prevents
an oops due to a journal write on failed mount.
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h
index 7259211..1297794 100644
--- a/fs/logfs/logfs.h
+++ b/fs/logfs/logfs.h
@@ -82,7 +82,7 @@
 
 /* Read-only filesystem */
 #define LOGFS_SB_FLAG_RO	0x0001
-#define LOGFS_SB_FLAG_SEG_ALIAS	0x0002
+#define LOGFS_SB_FLAG_DIRTY	0x0002
 #define LOGFS_SB_FLAG_OBJ_ALIAS	0x0004
 #define LOGFS_SB_FLAG_SHUTDOWN	0x0008
 
@@ -526,7 +526,7 @@
 void logfs_clear_inode(struct inode *inode);
 
 /* journal.c */
-void logfs_write_anchor(struct inode *inode);
+void logfs_write_anchor(struct super_block *sb);
 int logfs_init_journal(struct super_block *sb);
 void logfs_cleanup_journal(struct super_block *sb);
 int write_alias_journal(struct super_block *sb, u64 ino, u64 bix,