Merge tag 'asoc-v3.17-rc4' into asoc-linus
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / tree-log.c
index d296efe2d3e76ce4f690687a9647cf7f8c71a27f..1d1ba083ca6ecc1497bd1c141a431a2d5fa26cd9 100644 (file)
@@ -4093,18 +4093,8 @@ log_extents:
                }
        }
 
-       write_lock(&em_tree->lock);
-       /*
-        * If we're doing a ranged fsync and there are still modified extents
-        * in the list, we must run on the next fsync call as it might cover
-        * those extents (a full fsync or an fsync for other range).
-        */
-       if (list_empty(&em_tree->modified_extents)) {
-               BTRFS_I(inode)->logged_trans = trans->transid;
-               BTRFS_I(inode)->last_log_commit =
-                       BTRFS_I(inode)->last_sub_trans;
-       }
-       write_unlock(&em_tree->lock);
+       BTRFS_I(inode)->logged_trans = trans->transid;
+       BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->last_sub_trans;
 out_unlock:
        if (unlikely(err))
                btrfs_put_logged_extents(&logged_list);