aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-19 16:10:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-19 16:10:53 -0400
commit46be7b73e82453447cd97b3440d523159eab09f8 (patch)
treeb54c7a44f475e2bfed4b80331cbb836b77e096eb /fs/btrfs/tree-log.c
parent81770f41447bb2534d29b58a14ab501c0fb1e671 (diff)
parent0f23ae74f589304bf33233f85737f4fd368549eb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason: "I've got a revert to fix a regression with btrfs device registration, and Filipe has part two of his fsync fix from last week" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Revert "Btrfs: device_list_add() should not update list when mounted" Btrfs: set inode's logged_trans/last_log_commit after ranged fsync
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index d296efe2d3e7..1d1ba083ca6e 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4093,18 +4093,8 @@ log_extents:
4093 } 4093 }
4094 } 4094 }
4095 4095
4096 write_lock(&em_tree->lock); 4096 BTRFS_I(inode)->logged_trans = trans->transid;
4097 /* 4097 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->last_sub_trans;
4098 * If we're doing a ranged fsync and there are still modified extents
4099 * in the list, we must run on the next fsync call as it might cover
4100 * those extents (a full fsync or an fsync for other range).
4101 */
4102 if (list_empty(&em_tree->modified_extents)) {
4103 BTRFS_I(inode)->logged_trans = trans->transid;
4104 BTRFS_I(inode)->last_log_commit =
4105 BTRFS_I(inode)->last_sub_trans;
4106 }
4107 write_unlock(&em_tree->lock);
4108out_unlock: 4098out_unlock:
4109 if (unlikely(err)) 4099 if (unlikely(err))
4110 btrfs_put_logged_extents(&logged_list); 4100 btrfs_put_logged_extents(&logged_list);