]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
jfs: flush journal completely before releasing metadata inodes
authorDave Kleikamp <dave.kleikamp@oracle.com>
Mon, 1 Aug 2011 17:41:00 +0000 (12:41 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Mon, 1 Aug 2011 17:41:00 +0000 (12:41 -0500)
This fixes a race during unmount. We need to not only make sure that
the journal is completely written, but that the metadata changes make
it to disk before releasing ipimap and ipbmap.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
fs/jfs/jfs_umount.c

index adcf92d3b6035f0396f4a3428aa91f0fddae1055..7971f37534a359e0dcfed248cb56e56a14c7fac7 100644 (file)
@@ -68,7 +68,7 @@ int jfs_umount(struct super_block *sb)
                /*
                 * Wait for outstanding transactions to be written to log:
                 */
-               jfs_flush_journal(log, 1);
+               jfs_flush_journal(log, 2);
 
        /*
         * close fileset inode allocation map (aka fileset inode)
@@ -146,7 +146,7 @@ int jfs_umount_rw(struct super_block *sb)
         *
         * remove file system from log active file system list.
         */
-       jfs_flush_journal(log, 1);
+       jfs_flush_journal(log, 2);
 
        /*
         * Make sure all metadata makes it to disk