]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/file.c
Merge branch 'for-chris' of
[karo-tx-linux.git] / fs / btrfs / file.c
index c6a22d783c35576253d96f1c3380b01d949f9eca..e3a1b0c2394c4a9196e72ccc4f1c57850ca1b456 100644 (file)
@@ -1480,14 +1480,12 @@ int btrfs_sync_file(struct file *file, int datasync)
         * the current transaction, we can bail out now without any
         * syncing
         */
-       mutex_lock(&root->fs_info->trans_mutex);
+       smp_mb();
        if (BTRFS_I(inode)->last_trans <=
            root->fs_info->last_trans_committed) {
                BTRFS_I(inode)->last_trans = 0;
-               mutex_unlock(&root->fs_info->trans_mutex);
                goto out;
        }
-       mutex_unlock(&root->fs_info->trans_mutex);
 
        /*
         * ok we haven't committed the transaction yet, lets do a commit