Btrfs: barrier before waitqueue_active
authorJosef Bacik <jbacik@fusionio.com>
Wed, 1 Aug 2012 19:36:24 +0000 (15:36 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 28 Aug 2012 20:53:33 +0000 (16:53 -0400)
commit66657b318e0e443ada229fccd40c8be86cfebdbf
treebf1334fff93556fbc8d82b26a6d5431fd9e74b5c
parent1fa11e265fa2562fb713171b6a58e72bb7afd276
Btrfs: barrier before waitqueue_active

We need a barrir before calling waitqueue_active otherwise we will miss
wakeups.  So in places that do atomic_dec(); then atomic_read() use
atomic_dec_return() which imply a memory barrier (see memory-barriers.txt)
and then add an explicit memory barrier everywhere else that need them.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/compression.c
fs/btrfs/delayed-inode.c
fs/btrfs/disk-io.c
fs/btrfs/inode.c
fs/btrfs/volumes.c