Skip to content

Commit 9a86962

Browse files
ukernelidryomov
authored andcommitted
ceph: cleanup ceph_readdir_prepopulate()
In LSSNAP case, req->r_dentry is already set to snapdir dentry. Signed-off-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent b74fcea commit 9a86962

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

fs/ceph/inode.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
14771477
struct dentry *dn;
14781478
struct inode *in;
14791479
int err = 0, skipped = 0, ret, i;
1480-
struct inode *snapdir = NULL;
14811480
struct ceph_mds_request_head *rhead = req->r_request->front.iov_base;
14821481
u32 frag = le32_to_cpu(rhead->args.readdir.frag);
14831482
u32 last_hash = 0;
@@ -1510,8 +1509,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
15101509
}
15111510

15121511
if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) {
1513-
snapdir = ceph_get_snapdir(d_inode(parent));
1514-
parent = d_find_alias(snapdir);
15151512
dout("readdir_prepopulate %d items under SNAPDIR dn %p\n",
15161513
rinfo->dir_nr, parent);
15171514
} else {
@@ -1650,10 +1647,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
16501647
req->r_readdir_cache_idx = cache_ctl.index;
16511648
}
16521649
ceph_readdir_cache_release(&cache_ctl);
1653-
if (snapdir) {
1654-
iput(snapdir);
1655-
dput(parent);
1656-
}
16571650
dout("readdir_prepopulate done\n");
16581651
return err;
16591652
}

0 commit comments

Comments
 (0)