summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2026-08-25 12:04:19 -0400
committerDavid Sterba <dsterba@suse.com>2026-10-12 19:16:20 +0200
commit83fc65e09088b62a424ce13d8162f451a1415457 (patch)
tree777f0f03a8ccd9fe60579a1e906c14fda2ac29ff /tools/perf/scripts/python
parentf95420e3068fe62ce659e150f81ddf894b56c8c9 (diff)
downloadlinux-83fc65e09088b62a424ce13d8162f451a1415457.tar.gz
linux-83fc65e09088b62a424ce13d8162f451a1415457.zip
btrfs: handle ENOMEM from btrfs_insert_dir_item() without aborting
Now that btrfs_insert_dir_item() returns -ENOMEM before modifying the btree (thanks to delayed dir index pre-allocation), callers can handle ENOMEM gracefully instead of aborting the transaction. - btrfs_add_link(): add -ENOMEM to the recoverable errors alongside -EEXIST and -EOVERFLOW. - btrfs_create_new_inode(): on -ENOMEM from btrfs_add_link(), orphan the newly-created inode instead of aborting. The inode item was already written with nlink 1, and discard_new_inode() marks it bad so eviction won't delete it. So clear_nlink() alone is not enough: persist nlink 0 via btrfs_update_inode(), otherwise orphan cleanup would see nlink > 0, drop the orphan item, and leak the inode. Fall back to aborting only if that update also fails. This turns a filesystem-killing abort into a graceful -ENOMEM return for create(), mkdir(), mknod(), symlink(), and link() under memory pressure. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions