summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-07-26 05:17:29 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:45 +0200
commit9a86962b35be06c8908028975e2261e4df0f79fd (patch)
treecdc26e1ecd46fa8101833554559335d36037093d /fs/ceph
parentceph: use errseq_t for writeback error reporting (diff)
downloadlinux-9a86962b35be06c8908028975e2261e4df0f79fd.tar.xz
linux-9a86962b35be06c8908028975e2261e4df0f79fd.zip
ceph: cleanup ceph_readdir_prepopulate()
In LSSNAP case, req->r_dentry is already set to snapdir dentry. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 220dfd87cbfa..2c5db3686173 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1477,7 +1477,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
struct dentry *dn;
struct inode *in;
int err = 0, skipped = 0, ret, i;
- struct inode *snapdir = NULL;
struct ceph_mds_request_head *rhead = req->r_request->front.iov_base;
u32 frag = le32_to_cpu(rhead->args.readdir.frag);
u32 last_hash = 0;
@@ -1510,8 +1509,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
}
if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) {
- snapdir = ceph_get_snapdir(d_inode(parent));
- parent = d_find_alias(snapdir);
dout("readdir_prepopulate %d items under SNAPDIR dn %p\n",
rinfo->dir_nr, parent);
} else {
@@ -1650,10 +1647,6 @@ out:
req->r_readdir_cache_idx = cache_ctl.index;
}
ceph_readdir_cache_release(&cache_ctl);
- if (snapdir) {
- iput(snapdir);
- dput(parent);
- }
dout("readdir_prepopulate done\n");
return err;
}