aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorFilipe Manana <[email protected]>2025-02-15 11:04:15 +0000
committerDavid Sterba <[email protected]>2025-02-21 08:32:07 +0000
commitc6c9c4d56483d941f567eb921434c25fc6086dfa (patch)
tree4bab4bc4c6182f29e2075e1cd0e34aff382b6987 /net/switchdev/switchdev.c
parentbtrfs: fix use-after-free on inode when scanning root during em shrinking (diff)
downloadkernel-c6c9c4d56483d941f567eb921434c25fc6086dfa.tar.gz
kernel-c6c9c4d56483d941f567eb921434c25fc6086dfa.zip
btrfs: skip inodes without loaded extent maps when shrinking extent maps
If there are inodes that don't have any loaded extent maps, we end up grabbing a reference on them and later adding a delayed iput, which wakes up the cleaner and makes it do unnecessary work. This is common when for example the inodes were open only to run stat(2) or all their extent maps were already released through the folio release callback (btrfs_release_folio()) or released by a previous run of the shrinker, or directories which never have extent maps. Reported-by: Ivan Shapovalov <[email protected]> Tested-by: Ivan Shapovalov <[email protected]> Link: https://lore.kernel.org/linux-btrfs/[email protected]/ CC: [email protected] # 6.13+ Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions