mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
kernfs: update sysfs_init_inode_attrs()
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: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e756bc5670
commit
9a8049affd
2 changed files with 29 additions and 37 deletions
|
@ -18,9 +18,9 @@
|
|||
#include <linux/kernfs.h>
|
||||
|
||||
struct sysfs_inode_attrs {
|
||||
struct iattr ia_iattr;
|
||||
void *ia_secdata;
|
||||
u32 ia_secdata_len;
|
||||
struct iattr ia_iattr;
|
||||
void *ia_secdata;
|
||||
u32 ia_secdata_len;
|
||||
};
|
||||
|
||||
#define SD_DEACTIVATED_BIAS INT_MIN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue