]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: Propagate dentry down to inode_change_ok()
authorJan Kara <jack@suse.cz>
Thu, 26 May 2016 14:10:38 +0000 (16:10 +0200)
committerJan Kara <jack@suse.cz>
Thu, 22 Sep 2016 08:56:19 +0000 (10:56 +0200)
commit85a9352b8fd767b1d74ae7e20a637d96236d8879
tree24e1f8a7fa4a0ec32e88d8c3a28ab43bcd131b97
parent2dc2724f4fdd2dc15d051b4f3ee00305c870dd48
ceph: Propagate dentry down to inode_change_ok()

To avoid clearing of capabilities or security related extended
attributes too early, inode_change_ok() will need to take dentry instead
of inode. ceph_setattr() has the dentry easily available but
__ceph_setattr() is also called from ceph_set_acl() where dentry is not
easily available. Luckily that call path does not need inode_change_ok()
to be called anyway. So reorganize functions a bit so that
inode_change_ok() is called only from paths where dentry is available.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ceph/acl.c
fs/ceph/inode.c