From: Josef Bacik Date: Wed, 17 Apr 2013 16:16:59 +0000 (-0400) Subject: Btrfs: fix lockdep warning X-Git-Tag: firefly_0821_release~3680^2~310^2~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=62dbd7176e196cd042c5542696981b268264fe92;p=firefly-linux-kernel-4.4.55.git Btrfs: fix lockdep warning The locking order for stuff is __sb_start_write ordered_mutex but with sync() we don't do __sb_start_write for some strange reason, which means that our iput in wait_ordered_extents could start a transaction which does the __sb_start_write while we're holding the ordered_mutex. Fix this by using delayed iput in sync. Thanks, Reported-by: David Sterba Signed-off-by: Josef Bacik --- diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 5dc54ae5ac81..a4807ced23cc 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -866,7 +866,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait) return 0; } - btrfs_wait_ordered_extents(root, 0); + btrfs_wait_ordered_extents(root, 1); trans = btrfs_attach_transaction_barrier(root); if (IS_ERR(trans)) {