]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid deadlocks from GFP_KERNEL allocations during btrfs_real_readdir
authorChris Mason <chris.mason@oracle.com>
Fri, 27 Apr 2012 18:23:22 +0000 (14:23 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 27 Apr 2012 18:23:22 +0000 (14:23 -0400)
commit75647f095ccdc6d63076826b909658bc7a78c0a6
tree86e59f6bf94ad77c2fa1b232faa8f8b63b8675cb
parentadafa42cbb67f4514174771e5c0642072328ada7
Btrfs: avoid deadlocks from GFP_KERNEL allocations during btrfs_real_readdir

Btrfs has an optimization where it will preallocate dentries during
readdir to fill in enough information to open the inode without an extra
lookup.

But, we're calling d_alloc, which is doing GFP_KERNEL allocations, and
that leads to deadlocks because our readdir code has tree locks held.

For now, disable this optimization.  We'll fix the gfp mask in the next
merge window.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c