• Tejun Heo's avatar
    kernfs: update sysfs_init_inode_attrs() · 9a8049af
    Tejun Heo authored
    sysfs_init_inode_attrs() is a bit clumsy to use requiring the caller
    to check whether @sd->s_iattr is already set or not.  Rename it to
    sysfs_inode_attrs(), update it to check whether @sd->s_iattr is
    already initialized before trying to initialize it and return
    @sd->s_iattr.  This simplifies the callers.
    
    While at it,
    
    * Rename struct sysfs_inode_attrs pointer variables to "attrs".  As
      kernfs no longer deals with "struct attribute", this isn't confusing
      and makes it easier to distinguish from struct iattr pointers.
    
    * A new field will be added to sysfs_inode_attrs.  Reindent in
      preparation.
    
    This patch doesn't introduce any behavior changes.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9a8049af
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...