summaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2025-07-25 17:08:13 +0100
committerDavid Sterba <dsterba@suse.com>2025-08-22 00:58:28 +0200
commit5bb00879cb23db7e5e2fc0aa47b5ce3b1c713d8a (patch)
treee511c2b00b185ba82b7e48e3643a5bbecef78ee8 /scripts/bpf_doc.py
parente87e953bb20629ca1f008f8146c38e313e5ed319 (diff)
btrfs: simplify error handling logic for btrfs_link()
Instead of incrementing the inode's link count and refcount early before adding the link, updating the inode and deleting orphan item, do it after all those steps succeeded right before calling d_instantiate(). This makes the error handling logic simpler by avoiding the need for the 'drop_inode' variable to signal if we need to undo the link count increment and the inode refcount increase under the 'fail' label. This also reduces the level of indentation by one, making the code easier to read. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions