switch ->setxattr() to passing dentry and inode separately
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 27 May 2016 15:06:05 +0000 (11:06 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 May 2016 00:09:16 +0000 (20:09 -0400)
commit3767e255b390d72f9a33c08d9e86c5f21f25860f
tree519dcbb61591a2ad94c36d3896e4787074e4813d
parent5930122683dff58f0846b0f0405b4bd598a3ba6a
switch ->setxattr() to passing dentry and inode separately

smack ->d_instantiate() uses ->setxattr(), so to be able to call it before
we'd hashed the new dentry and attached it to inode, we need ->setxattr()
instances getting the inode as an explicit argument rather than obtaining
it from dentry.

Similar change for ->getxattr() had been done in commit ce23e64.  Unlike
->getxattr() (which is used by both selinux and smack instances of
->d_instantiate()) ->setxattr() is used only by smack one and unfortunately
it got missed back then.

Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Tested-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
20 files changed:
Documentation/filesystems/porting
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/xattr.c
fs/bad_inode.c
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/inode.c
fs/ecryptfs/mmap.c
fs/fuse/dir.c
fs/hfs/attr.c
fs/hfs/hfs_fs.h
fs/kernfs/inode.c
fs/kernfs/kernfs-internal.h
fs/libfs.c
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/xattr.c
include/linux/fs.h
include/linux/xattr.h
security/smack/smack_lsm.c