]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix unprotected device's variants on 32bits machine
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 3 Sep 2014 13:35:38 +0000 (21:35 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:38 +0000 (13:38 -0700)
commita4e2f942d87bb2cf0a6dbe52557610ab6cbed76f
tree1befd9a2bea8e1808f0fe1b12406c05b3f7dbe2d
parentb146b7e174ce2b6139cd1e887899b2ce00ed1517
Btrfs: fix unprotected device's variants on 32bits machine

->total_bytes,->disk_total_bytes,->bytes_used is protected by chunk
lock when we change them, but sometimes we read them without any lock,
and we might get unexpected value. We fix this problem like inode's
i_size.

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