summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/kernfs-internal.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-23 23:40:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-04 16:34:45 +0100
commit9a8049affd55a2c857a89faece27b878416fbf91 (patch)
tree721a52df9028ce8008736ad85738c73c6f0e4e82 /fs/kernfs/kernfs-internal.h
parentkobject: fix kset sample error path (diff)
downloadlinux-9a8049affd55a2c857a89faece27b878416fbf91.tar.xz
linux-9a8049affd55a2c857a89faece27b878416fbf91.zip
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>
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
-rw-r--r--fs/kernfs/kernfs-internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index d1ff591c5cf3..f25b3548bcca 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -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