kernfs: do not alloc iattrs in kernfs_xattr_get
authorOndrej Mosnacek <omosnace@redhat.com>
Fri, 22 Feb 2019 14:57:13 +0000 (15:57 +0100)
committerPaul Moore <paul@paul-moore.com>
Thu, 21 Mar 2019 01:47:36 +0000 (21:47 -0400)
commitd0c9c153b4bd6963c8fcccbc0caa12e8fa8d971d
treeefb7a76003b4cd0708bc62de789a503072bb5e86
parent05895219627c416e3ba78de84b83c6937387786b
kernfs: do not alloc iattrs in kernfs_xattr_get

This is a read-only operation, so we can simply return -ENODATA if
kn->iattr is NULL.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
[PM: minor merge fixes]
Signed-off-by: Paul Moore <paul@paul-moore.com>
fs/kernfs/inode.c