]> err.no Git - linux-2.6/blobdiff - fs/jfs/super.c
JFS: Fix race in txLock
[linux-2.6] / fs / jfs / super.c
index 810a3653d8b3a4f26ffb66d4c4a883733445c5eb..9ff89720f93bab8bfeaee75ac656e04f6a0de3ee 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/completion.h>
 #include <linux/vfs.h>
 #include <linux/moduleparam.h>
+#include <linux/posix_acl.h>
 #include <asm/uaccess.h>
 
 #include "jfs_incore.h"
@@ -113,6 +114,8 @@ static void jfs_destroy_inode(struct inode *inode)
 {
        struct jfs_inode_info *ji = JFS_IP(inode);
 
+       BUG_ON(!list_empty(&ji->anon_inode_list));
+
        spin_lock_irq(&ji->ag_lock);
        if (ji->active_ag != -1) {
                struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
@@ -530,7 +533,7 @@ static int jfs_sync_fs(struct super_block *sb, int wait)
        /* log == NULL indicates read-only mount */
        if (log) {
                jfs_flush_journal(log, wait);
-               jfs_syncpt(log);
+               jfs_syncpt(log, 0);
        }
 
        return 0;