From 05895219627c416e3ba78de84b83c6937387786b Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Fri, 22 Feb 2019 15:57:12 +0100 Subject: kernfs: clean up struct kernfs_iattrs Right now, kernfs_iattrs embeds the whole struct iattr, even though it doesn't really use half of its fields... This both leads to wasting space and makes the code look awkward. Let's just list the few fields we need directly in struct kernfs_iattrs. Signed-off-by: Ondrej Mosnacek Acked-by: Casey Schaufler [PM: merged a number of chunks manually due to fuzz] Signed-off-by: Paul Moore --- fs/kernfs/symlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/kernfs/symlink.c') diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c index 162f43b80c84..eb46c3a16e2f 100644 --- a/fs/kernfs/symlink.c +++ b/fs/kernfs/symlink.c @@ -33,8 +33,8 @@ struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, kgid_t gid = GLOBAL_ROOT_GID; if (target->iattr) { - uid = target->iattr->ia_iattr.ia_uid; - gid = target->iattr->ia_iattr.ia_gid; + uid = target->iattr->ia_uid; + gid = target->iattr->ia_gid; } kn = kernfs_new_node(parent, name, S_IFLNK|S_IRWXUGO, uid, gid, -- cgit v1.2.1