diff options
author | Joel Stanley <joel@jms.id.au> | 2020-08-04 10:58:32 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2020-08-04 10:58:36 +0300 |
commit | 9524588381df213554a10d3661a9200a4b7f6db2 (patch) | |
tree | a4d281b99dcd28b9a1d3077299c26a5671abff88 /fs/btrfs/volumes.c | |
parent | 666e403461fd046b37bc95bba49e82ca6a758bea (diff) | |
parent | 67da9e2c2b730b9b788ace749d22d769cf11ee2b (diff) | |
download | linux-dev-5.7.tar.xz |
Merge tag 'v5.7.12' into dev-5.7dev-5.7
This is the 5.7.12 stable release
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 21c7d3d87827..45cf455f906d 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -7056,6 +7056,14 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info) mutex_lock(&fs_info->chunk_mutex); /* + * It is possible for mount and umount to race in such a way that + * we execute this code path, but open_fs_devices failed to clear + * total_rw_bytes. We certainly want it cleared before reading the + * device items, so clear it here. + */ + fs_info->fs_devices->total_rw_bytes = 0; + + /* * Read all device items, and then all the chunk items. All * device items are found before any chunk item (their object id * is smaller than the lowest possible object id for a chunk |