From a26feccaba296bd0ae410eabce79cb3443c8a701 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Thu, 14 Apr 2016 00:30:16 +0200 Subject: ceph: Get rid of d_find_alias in ceph_set_acl Create a variant of ceph_setattr that takes an inode instead of a dentry. Change __ceph_setxattr (and also __ceph_removexattr) to take an inode instead of a dentry. Use those in ceph_set_acl so that we no longer need a dentry there. Signed-off-by: Andreas Gruenbacher Signed-off-by: "Yan, Zheng" Signed-off-by: Al Viro --- fs/ceph/inode.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'fs/ceph/inode.c') diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index ed58b168904a..cadb6aee7f70 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1776,16 +1776,12 @@ static const struct inode_operations ceph_symlink_iops = { .removexattr = ceph_removexattr, }; -/* - * setattr - */ -int ceph_setattr(struct dentry *dentry, struct iattr *attr) +int __ceph_setattr(struct inode *inode, struct iattr *attr) { - struct inode *inode = d_inode(dentry); struct ceph_inode_info *ci = ceph_inode(inode); const unsigned int ia_valid = attr->ia_valid; struct ceph_mds_request *req; - struct ceph_mds_client *mdsc = ceph_sb_to_client(dentry->d_sb)->mdsc; + struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; struct ceph_cap_flush *prealloc_cf; int issued; int release = 0, dirtied = 0; @@ -2009,6 +2005,14 @@ out_put: return err; } +/* + * setattr + */ +int ceph_setattr(struct dentry *dentry, struct iattr *attr) +{ + return __ceph_setattr(d_inode(dentry), attr); +} + /* * Verify that we have a lease on the given mask. If not, * do a getattr against an mds. -- cgit v1.2.3