Re: [PATCH v4 6/6] kernfs: Use RCU to access kernfs_node::name.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Fri, Jan 24, 2025 at 06:46:14PM +0100, Sebastian Andrzej Siewior wrote:
> Using RCU lifetime rules to access kernfs_node::name can avoid the
> trouble kernfs_rename_lock in kernfs_name() and kernfs_path_from_node()
> if the fs was created with KERNFS_ROOT_INVARIANT_PARENT.

Maybe explain why we want to do this?

> +static inline const char *kernfs_rcu_get_name(const struct kernfs_node *kn)
> +{
> +	return rcu_dereference_check(kn->name, kernfs_root_is_locked(kn));
> +}

Can you drop "get" from the accessors? Other accessors don't have it and it
gets confusing with reference counting operations.

Thanks.

-- 
tejun




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux