Skip to content

Commit

Permalink
Btrfs: don't wait on ordered extents if we have a trans open
Browse files Browse the repository at this point in the history
Dave was hitting a lockdep warning because we're now properly taking the ordered
operations mutex in the ordered wait stuff.  This is because some cases we will
have a trans handle when we are flushing delalloc space, but we can't wait on
ordered extents because we could potentially deadlock, so fix this by not doing
the wait if we have a trans handle.  Thanks

Reported-and-tested-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
  • Loading branch information
Josef Bacik committed May 6, 2013
1 parent 8c579fe commit 98ad69c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3920,7 +3920,8 @@ void btrfs_writeback_inodes_sb_nr(struct btrfs_root *root,
* the disk).
*/
btrfs_start_delalloc_inodes(root, 0);
btrfs_wait_ordered_extents(root, 0);
if (!current->journal_info)
btrfs_wait_ordered_extents(root, 0);
}
}

Expand Down

0 comments on commit 98ad69c

Please sign in to comment.