diff options
| author | Chris Mason <[email protected]> | 2023-06-09 17:53:41 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2023-06-12 22:01:08 +0000 |
| commit | deccae40e4b30f98837e44225194d80c8baf2233 (patch) | |
| tree | 0b6f19beb19c9a3230ec570970fb4a166df4e141 /net/nsh/nsh.c | |
| parent | btrfs: fix iomap_begin length for nocow writes (diff) | |
| download | kernel-deccae40e4b30f98837e44225194d80c8baf2233.tar.gz kernel-deccae40e4b30f98837e44225194d80c8baf2233.zip | |
btrfs: can_nocow_file_extent should pass down args->strict from callers
Commit 619104ba453ad0 ("btrfs: move common NOCOW checks against a file
extent into a helper") changed our call to btrfs_cross_ref_exist() to
always pass false for the 'strict' parameter. We're passing this down
through the stack so that we can do a full check for cross references
during swapfile activation.
With strict always false, this test fails:
btrfs subvol create swappy
chattr +C swappy
fallocate -l1G swappy/swapfile
chmod 600 swappy/swapfile
mkswap swappy/swapfile
btrfs subvol snap swappy swapsnap
btrfs subvol del -C swapsnap
btrfs fi sync /
sync;sync;sync
swapon swappy/swapfile
The fix is to just use args->strict, and everyone except swapfile
activation is passing false.
Fixes: 619104ba453ad0 ("btrfs: move common NOCOW checks against a file extent into a helper")
CC: [email protected] # 6.1+
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'net/nsh/nsh.c')
0 files changed, 0 insertions, 0 deletions
