]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
btrfs: do not background blkdev_put()
authorAnand Jain <Anand.Jain@oracle.com>
Thu, 21 Jul 2016 22:04:53 +0000 (06:04 +0800)
committerChris Mason <clm@fb.com>
Thu, 25 Aug 2016 10:58:28 +0000 (03:58 -0700)
commit142388194191a3edc9ba01cfcfd8b691e0971fb2
tree74a124de8b642896e249df532305b3f1cf317869
parent28b737f6ede3661fe610937706c4a6f50e9ab769
btrfs: do not background blkdev_put()

At the end of unmount/dev-delete, if the device exclusive open is not
actually closed, then there might be a race with another program in
the userland who is trying to open the device in exclusive mode and
it may fail for eg:
      unmount /btrfs; fsck /dev/x
      btrfs dev del /dev/x /btrfs; fsck /dev/x
so here background blkdev_put() is not a choice

Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c