aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-10-15 13:33:54 -0400
committerChris Mason <chris.mason@fusionio.com>2012-12-16 20:46:25 -0500
commited7b63eb8afd0bb8d978a23184d70c105b54aa26 (patch)
tree63a4dd9371818be8f98f272d5ea12fd41715c1bb /fs
parentbb146eb265091f472ada52a3419d41e9b0ff1f7d (diff)
Btrfs: only clear dirty on the buffer if it is marked as dirty
No reason to set the path blocking or loop through all of the pages if the extent buffer isn't actually marked dirty. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b8f7f04a6407..65f03670a952 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1142,11 +1142,11 @@ void clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
1142 root->fs_info->dirty_metadata_bytes); 1142 root->fs_info->dirty_metadata_bytes);
1143 } 1143 }
1144 spin_unlock(&root->fs_info->delalloc_lock); 1144 spin_unlock(&root->fs_info->delalloc_lock);
1145 }
1146 1145
1147 /* ugh, clear_extent_buffer_dirty needs to lock the page */ 1146 /* ugh, clear_extent_buffer_dirty needs to lock the page */
1148 btrfs_set_lock_blocking(buf); 1147 btrfs_set_lock_blocking(buf);
1149 clear_extent_buffer_dirty(buf); 1148 clear_extent_buffer_dirty(buf);
1149 }
1150 } 1150 }
1151} 1151}
1152 1152