btrfs: fix unlocked access of delalloc_inodes
authorDavid Sterba <dsterba@suse.cz>
Thu, 9 Jun 2011 10:02:51 +0000 (10:02 +0000)
committerChris Mason <chris.mason@oracle.com>
Fri, 10 Jun 2011 22:57:11 +0000 (18:57 -0400)
commit5be76758f35ec6578e5b9b150aa513ac26bd9c54
tree071251fb002ec06e3db5848e9385386aa04f9197
parent027ed2f0044e95a97ed34db2d55a9ca95ba84385
btrfs: fix unlocked access of delalloc_inodes

list_splice_init will make delalloc_inodes empty, but without a spinlock
around, this may produce corrupted list head, accessed in many placess,
The race window is very tight and nobody seems to have hit it so far.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c