summaryrefslogtreecommitdiffstats
path: root/fs/timerfd.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-03-09 15:18:39 +0000
committerChris Mason <chris.mason@fusionio.com>2013-03-14 14:57:29 -0400
commitbc178622d40d87e75abc131007342429c9b03351 (patch)
tree986ef507751bf60ce7eeab4715da35d414b2deb4 /fs/timerfd.c
parentd340d2475c6e394013325f83f499594628a9e558 (diff)
downloadlinux-stable-bc178622d40d87e75abc131007342429c9b03351.tar.gz
linux-stable-bc178622d40d87e75abc131007342429c9b03351.tar.bz2
linux-stable-bc178622d40d87e75abc131007342429c9b03351.zip
btrfs: use rcu_barrier() to wait for bdev puts at unmount
Doing this would reliably fail with -EBUSY for me: # mount /dev/sdb2 /mnt/scratch; umount /mnt/scratch; mkfs.btrfs -f /dev/sdb2 ... unable to open /dev/sdb2: Device or resource busy because mkfs.btrfs tries to open the device O_EXCL, and somebody still has it. Using systemtap to track bdev gets & puts shows a kworker thread doing a blkdev put after mkfs attempts a get; this is left over from the unmount path: btrfs_close_devices __btrfs_close_devices call_rcu(&device->rcu, free_device); free_device INIT_WORK(&device->rcu_work, __free_device); schedule_work(&device->rcu_work); so unmount might complete before __free_device fires & does its blkdev_put. Adding an rcu_barrier() to btrfs_close_devices() causes unmount to wait until all blkdev_put()s are done, and the device is truly free once unmount completes. Cc: stable@vger.kernel.org Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/timerfd.c')
0 files changed, 0 insertions, 0 deletions