]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: check the root node for uptodate before returning it
authorJosef Bacik <josef@toxicpanda.com>
Wed, 24 Nov 2021 19:14:24 +0000 (14:14 -0500)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:23 +0000 (14:18 +0100)
commitf6834bb5004d3687862f8f8b268f8e6d9e621a55
treee66ce56ef7c73424f7605eb9edc326a6f9f563d1
parent3599611ef583636edd665f011ecca60e96f0b53e
btrfs: check the root node for uptodate before returning it

Now that we clear the extent buffer uptodate if we fail to write it out
we need to check to see if our root node is uptodate before we search
down it.  Otherwise we could return stale data (or potentially corrupt
data that was caught by the write verification step) and think that the
path is OK to search down.

CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c