]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix unprotected device list access when cloning fs devices
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 3 Sep 2014 13:35:42 +0000 (21:35 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:43 +0000 (13:38 -0700)
commit3d443c7edc48d37c60b58e9f8726242e83ba3076
tree4ee13e368464d455415919b0d52ca75defa4ff3e
parent078a76542eb283733f72ddad9aacf4c9592aa39c
Btrfs: fix unprotected device list access when cloning fs devices

We can build a new filesystem based a seed filesystem, and we need clone
the fs devices when we open the new filesystem. But someone might clear
the seed flag of the seed filesystem, then mount that filesystem and
remove some device. If we mount the new filesystem, we might access
a device list which was being changed when we clone the fs devices.
Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c