Skip to content
Commit 1cf474cd authored by Sweet Tea Dorminy's avatar Sweet Tea Dorminy Committed by Greg Kroah-Hartman
Browse files

btrfs: use struct qstr instead of name and namelen pairs



[ Upstream commit e43eec81 ]

Many functions throughout btrfs take name buffer and name length
arguments. Most of these functions at the highest level are usually
called with these arguments extracted from a supplied dentry's name.
But the entire name can be passed instead, making each function a little
more elegant.

Each function whose arguments are currently the name and length
extracted from a dentry is herein converted to instead take a pointer to
the name in the dentry. The couple of calls to these calls without a
struct dentry are converted to create an appropriate qstr to pass in.
Additionally, every function which is only called with a name/len
extracted directly from a qstr is also converted.

This change has positive effect on stack consumption, frame of many
functions is reduced but this will be used in the future for fscrypt
related structures.

Signed-off-by: default avatarSweet Tea Dorminy <sweettea-kernel@dorminy.me>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Stable-dep-of: 9af86694 ("btrfs: file_remove_privs needs an exclusive lock in direct io write")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 87efd87d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment