diff mbox

Log parent inode if it is newer than the last commit

Message ID 20101106200305.5d9eb7e0.kitayama@cl.bb4u.ne.jp
State New, archived
Headers show

Commit Message

Itaru Kitayama Nov. 6, 2010, 11:03 a.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index a29f193..db63ae4 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3007,7 +3007,7 @@  int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
                if (root != BTRFS_I(inode)->root)
                        break;
 
-               if (BTRFS_I(inode)->generation >
+               if (max(BTRFS_I(inode)->generation, BTRFS_I(inode)->last_trans) >
                    root->fs_info->last_trans_committed) {
                        ret = btrfs_log_inode(trans, root, inode, inode_only);
                        if (ret)