diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-05-28 07:00:39 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-28 07:00:39 -0400 |
commit | ff5714cca971848963b87d6b477c16ca8abbaa54 (patch) | |
tree | 17ee34b9b5e00804df4059503f82f6f1d94383a9 /fs/btrfs/file.c | |
parent | 174ba50915b08dcfd07c8b5fb795b46a165fa09a (diff) | |
parent | d90c732122a1f6d0efe388a8a204f67f144b2eb3 (diff) |
Merge branch 'for-chris' of
git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into for-linus
Conflicts:
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/transaction.c
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index c6a22d783c35..e3a1b0c2394c 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1480,14 +1480,12 @@ int btrfs_sync_file(struct file *file, int datasync) | |||
1480 | * the current transaction, we can bail out now without any | 1480 | * the current transaction, we can bail out now without any |
1481 | * syncing | 1481 | * syncing |
1482 | */ | 1482 | */ |
1483 | mutex_lock(&root->fs_info->trans_mutex); | 1483 | smp_mb(); |
1484 | if (BTRFS_I(inode)->last_trans <= | 1484 | if (BTRFS_I(inode)->last_trans <= |
1485 | root->fs_info->last_trans_committed) { | 1485 | root->fs_info->last_trans_committed) { |
1486 | BTRFS_I(inode)->last_trans = 0; | 1486 | BTRFS_I(inode)->last_trans = 0; |
1487 | mutex_unlock(&root->fs_info->trans_mutex); | ||
1488 | goto out; | 1487 | goto out; |
1489 | } | 1488 | } |
1490 | mutex_unlock(&root->fs_info->trans_mutex); | ||
1491 | 1489 | ||
1492 | /* | 1490 | /* |
1493 | * ok we haven't committed the transaction yet, lets do a commit | 1491 | * ok we haven't committed the transaction yet, lets do a commit |