diff options
| author | Filipe Manana <[email protected]> | 2022-05-31 16:06:33 +0100 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2022-07-25 17:44:35 +0200 |
| commit | 814e77182b883702de7ce19854bbffae9cd4756b (patch) | |
| tree | a717b0f0714a6977f11bc727d617a4da1baaa51e /tools/perf/scripts/python | |
| parent | ca6dee6b7946794fa340a7290ca399a50b61705f (diff) | |
btrfs: free the path earlier when creating a new inode
When creating an inode, through btrfs_create_new_inode(), we release the
path we allocated before once we don't need it anymore. But we keep it
allocated until we return from that function, which is wasteful because
after we release the path we do several things that can allocate yet
another path: inheriting properties, setting the xattrs used by ACLs and
secutiry modules, adding an orphan item (O_TMPFILE case) or adding a
dir item (for the non-O_TMPFILE case).
So instead of releasing the path once we don't need it anymore, free it
instead. This way we avoid having two paths allocated until we return
from btrfs_create_new_inode().
Reviewed-by: Nikolay Borisov <[email protected]>
Reviewed-by: Nikolay Borisov <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions