fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
authorWang YanQing <udknight@gmail.com>
Tue, 23 Jun 2015 10:54:45 +0000 (18:54 +0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 1 Jul 2015 05:50:06 +0000 (01:50 -0400)
commit1af95de6f0119d5bde02d3a811a9f3a3661e954e
tree703a419f2f4c0203683b9030450d54bfaf1f76d8
parent2adc376c551943a07170cbe70f43e6d6065f8906
fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation

Execution of get_anon_bdev concurrently and preemptive kernel all
could bring race condition, it isn't enough to check dev against
its upper limitation with equality operator only.

This patch fix it.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/super.c