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)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 27 Feb 2019 02:11:27 +0000 (11:11 +0900)
commita2c96e7af40458704f2d09ed2ed245f09302bac0
tree9a5241dc05aa6a3d9baf117b9e5d5dc4a9ac28bc
parent4d1de4cfcdf4b22504d583eb08403ba46b6512f0
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>
[sw0312.kim: backport to 3.18]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ic064260484c41010024cd04f154b392a182e3da0
33 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/btrfs/xattr.c
fs/btrfs/xattr.h
fs/ceph/super.h
fs/ceph/xattr.c
fs/cifs/cifsfs.h
fs/cifs/xattr.c
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/inode.c
fs/ecryptfs/mmap.c
fs/fuse/dir.c
fs/gfs2/inode.c
fs/hfs/attr.c
fs/hfs/hfs_fs.h
fs/jfs/jfs_xattr.h
fs/jfs/xattr.c
fs/kernfs/inode.c
fs/kernfs/kernfs-internal.h
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/reiserfs/xattr.c
fs/reiserfs/xattr.h
fs/ubifs/ubifs.h
fs/ubifs/xattr.c
fs/xattr.c
include/linux/fs.h
include/linux/xattr.h
mm/shmem.c
security/smack/smack_lsm.c