ceph: Propagate dentry down to inode_change_ok()
authorJan Kara <jack@suse.cz>
Thu, 26 May 2016 14:10:38 +0000 (16:10 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 2 Dec 2016 05:35:22 +0000 (05:35 +0000)
commit36abd19a8ed04b4215b21f01825b9731de94d6f6
tree4eb34d4fb918c33172e17ac7f995e52dd6599ebf
parentf6bf270844c2770e998dc87f7c35e833ad109ab1
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>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name ceph-Propagate-dentry-down-to-inode_change_ok.patch
fs/ceph/acl.c
fs/ceph/inode.c