aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index dc54b2b38d14..93191ea5d1fd 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1948,8 +1948,6 @@ relock:
goto buffered;
}
- down_read(&BTRFS_I(inode)->dio_sem);
-
/*
* This is actually a sync iocb, so we need our fancy endio to know if
* we need to sync.
@@ -1964,7 +1962,6 @@ relock:
if (written == -ENOTBLK)
written = 0;
- up_read(&BTRFS_I(inode)->dio_sem);
btrfs_inode_unlock(inode, ilock_flags);
if (written < 0 || !iov_iter_count(from)) {
@@ -2172,13 +2169,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
inode_lock(inode);
- /*
- * We take the dio_sem here because the tree log stuff can race with
- * lockless dio writes and get an extent map logged for an extent we
- * never waited on. We need it this high up for lockdep reasons.
- */
- down_write(&BTRFS_I(inode)->dio_sem);
-
atomic_inc(&root->log_batch);
/*
@@ -2209,7 +2199,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
*/
ret = start_ordered_ops(inode, start, end);
if (ret) {
- up_write(&BTRFS_I(inode)->dio_sem);
inode_unlock(inode);
goto out;
}
@@ -2306,7 +2295,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
* file again, but that will end up using the synchronization
* inside btrfs_sync_log to keep things safe.
*/
- up_write(&BTRFS_I(inode)->dio_sem);
inode_unlock(inode);
if (ret != BTRFS_NO_LOG_SYNC) {
@@ -2337,7 +2325,6 @@ out:
out_release_extents:
btrfs_release_log_ctx_extents(&ctx);
- up_write(&BTRFS_I(inode)->dio_sem);
inode_unlock(inode);
goto out;
}