diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-06-16 14:39:19 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-20 14:22:48 +0200 |
commit | eca152edf57e04f61d5a79e404d8e6c147278fdf (patch) | |
tree | c6b3876b1a15f950a6154d3878f00ed1a73224d6 /lib/dec_and_lock.c | |
parent | 0d0c71b317207082856f40dbe8a2bac813f49677 (diff) | |
download | linux-stable-eca152edf57e04f61d5a79e404d8e6c147278fdf.tar.gz linux-stable-eca152edf57e04f61d5a79e404d8e6c147278fdf.tar.bz2 linux-stable-eca152edf57e04f61d5a79e404d8e6c147278fdf.zip |
btrfs: Manually implement device_total_bytes getter/setter
The device->total_bytes member needs to always be rounded down to sectorsize
so that it corresponds to the value of super->total_bytes. However, there are
multiple places where the setter is fed a value which is not rounded which
can cause a fs to be unmountable due to the check introduced in
99e3ecfcb9f4 ("Btrfs: add more validation checks for superblock"). This patch
implements the getter/setter manually so that in a later patch I can add
necessary code to catch offenders.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/dec_and_lock.c')
0 files changed, 0 insertions, 0 deletions