]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix small race with delalloc flushing waitqueue's
authorJosef Bacik <josef@redhat.com>
Fri, 12 Mar 2010 19:28:18 +0000 (19:28 +0000)
committerChris Mason <chris.mason@oracle.com>
Mon, 5 Apr 2010 18:42:00 +0000 (14:42 -0400)
commitdff0fd0a92b1f542dd40080ae74d9edae60406c9
tree91a5a1352cc803695b2ae3b3217c82d423ca5edf
parent9a16da1cefcac80474e01de38b787249bc4bb862
Btrfs: fix small race with delalloc flushing waitqueue's

Everytime we start a new flushing thread, we init the waitqueue if there isn't a
flushing thread running.  The problem with this is we check
space_info->flushing, which we clear right before doing a wake_up on the
flushing waitqueue, which causes problems if we init the waitqueue in the middle
of clearing the flushing flagh and calling wake_up.  This is hard to hit, but
the code is wrong anyway, so init the flushing/allocating waitqueue when
creating the space info and let it be.  I haven't seen the panic since I've been
using this patch.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c