Lines Matching refs:dn

1116 static struct dentry *splice_dentry(struct dentry *dn, struct inode *in)  in splice_dentry()  argument
1120 BUG_ON(d_inode(dn)); in splice_dentry()
1144 if (!d_unhashed(dn)) in splice_dentry()
1145 d_drop(dn); in splice_dentry()
1146 realdn = d_splice_alias(in, dn); in splice_dentry()
1149 PTR_ERR(realdn), dn, in, ceph_vinop(in)); in splice_dentry()
1150 dn = realdn; in splice_dentry()
1160 dn, d_count(dn), in splice_dentry()
1163 dput(dn); in splice_dentry()
1164 dn = realdn; in splice_dentry()
1166 BUG_ON(!ceph_dentry(dn)); in splice_dentry()
1168 dn, d_inode(dn), ceph_vinop(d_inode(dn))); in splice_dentry()
1171 return dn; in splice_dentry()
1220 struct dentry *dn, *parent; in ceph_fill_trace() local
1234 dn = d_lookup(parent, &dname); in ceph_fill_trace()
1236 parent, dname.len, dname.name, dn); in ceph_fill_trace()
1238 if (!dn) { in ceph_fill_trace()
1239 dn = d_alloc(parent, &dname); in ceph_fill_trace()
1241 dname.len, dname.name, dn); in ceph_fill_trace()
1242 if (!dn) { in ceph_fill_trace()
1248 } else if (d_really_is_positive(dn) && in ceph_fill_trace()
1249 (ceph_ino(d_inode(dn)) != tvino.ino || in ceph_fill_trace()
1250 ceph_snap(d_inode(dn)) != tvino.snap)) { in ceph_fill_trace()
1252 dn, d_inode(dn)); in ceph_fill_trace()
1254 d_delete(dn); in ceph_fill_trace()
1255 dput(dn); in ceph_fill_trace()
1259 req->r_dentry = dn; in ceph_fill_trace()
1303 struct dentry *dn = req->r_dentry; in ceph_fill_trace() local
1306 BUG_ON(!dn); in ceph_fill_trace()
1308 BUG_ON(d_inode(dn->d_parent) != dir); in ceph_fill_trace()
1335 dn, dn); in ceph_fill_trace()
1337 req->r_old_dentry, dn); in ceph_fill_trace()
1343 d_move(req->r_old_dentry, dn); in ceph_fill_trace()
1347 dn, dn); in ceph_fill_trace()
1351 ceph_invalidate_dentry_lease(dn); in ceph_fill_trace()
1356 dn = req->r_old_dentry; /* use old_dentry */ in ceph_fill_trace()
1362 if (d_really_is_positive(dn)) { in ceph_fill_trace()
1363 dout("d_delete %p\n", dn); in ceph_fill_trace()
1365 d_delete(dn); in ceph_fill_trace()
1367 if (d_unhashed(dn)) in ceph_fill_trace()
1368 d_add(dn, NULL); in ceph_fill_trace()
1369 update_dentry_lease(dn, rinfo->dlease, in ceph_fill_trace()
1378 if (d_really_is_negative(dn)) { in ceph_fill_trace()
1381 dn = splice_dentry(dn, in); in ceph_fill_trace()
1382 if (IS_ERR(dn)) { in ceph_fill_trace()
1383 err = PTR_ERR(dn); in ceph_fill_trace()
1386 req->r_dentry = dn; /* may have spliced */ in ceph_fill_trace()
1387 } else if (d_really_is_positive(dn) && d_inode(dn) != in) { in ceph_fill_trace()
1389 dn, d_inode(dn), ceph_vinop(d_inode(dn)), in ceph_fill_trace()
1391 d_invalidate(dn); in ceph_fill_trace()
1398 update_dentry_lease(dn, rinfo->dlease, session, in ceph_fill_trace()
1402 dout(" final dn %p\n", dn); in ceph_fill_trace()
1407 struct dentry *dn = req->r_dentry; in ceph_fill_trace() local
1411 BUG_ON(!dn); in ceph_fill_trace()
1414 dout(" linking snapped dir %p to dn %p\n", in, dn); in ceph_fill_trace()
1417 dn = splice_dentry(dn, in); in ceph_fill_trace()
1418 if (IS_ERR(dn)) { in ceph_fill_trace()
1419 err = PTR_ERR(dn); in ceph_fill_trace()
1422 req->r_dentry = dn; /* may have spliced */ in ceph_fill_trace()
1495 static int fill_readdir_cache(struct inode *dir, struct dentry *dn, in fill_readdir_cache() argument
1524 dout("readdir cache dn %p idx %d\n", dn, ctl->index); in fill_readdir_cache()
1525 ctl->dentries[idx] = dn; in fill_readdir_cache()
1541 struct dentry *dn; in ceph_readdir_prepopulate() local
1625 dn = d_lookup(parent, &dname); in ceph_readdir_prepopulate()
1627 parent, dname.len, dname.name, dn); in ceph_readdir_prepopulate()
1629 if (!dn) { in ceph_readdir_prepopulate()
1630 dn = d_alloc(parent, &dname); in ceph_readdir_prepopulate()
1632 dname.len, dname.name, dn); in ceph_readdir_prepopulate()
1633 if (!dn) { in ceph_readdir_prepopulate()
1638 } else if (d_really_is_positive(dn) && in ceph_readdir_prepopulate()
1639 (ceph_ino(d_inode(dn)) != tvino.ino || in ceph_readdir_prepopulate()
1640 ceph_snap(d_inode(dn)) != tvino.snap)) { in ceph_readdir_prepopulate()
1641 struct ceph_dentry_info *di = ceph_dentry(dn); in ceph_readdir_prepopulate()
1643 dn, d_inode(dn)); in ceph_readdir_prepopulate()
1645 spin_lock(&dn->d_lock); in ceph_readdir_prepopulate()
1652 spin_unlock(&dn->d_lock); in ceph_readdir_prepopulate()
1654 d_delete(dn); in ceph_readdir_prepopulate()
1655 dput(dn); in ceph_readdir_prepopulate()
1660 if (d_really_is_positive(dn)) { in ceph_readdir_prepopulate()
1661 in = d_inode(dn); in ceph_readdir_prepopulate()
1666 d_drop(dn); in ceph_readdir_prepopulate()
1667 dput(dn); in ceph_readdir_prepopulate()
1678 if (d_really_is_negative(dn)) in ceph_readdir_prepopulate()
1680 d_drop(dn); in ceph_readdir_prepopulate()
1685 if (d_really_is_negative(dn)) { in ceph_readdir_prepopulate()
1690 " (security xattr deadlock)\n", dn, in); in ceph_readdir_prepopulate()
1696 realdn = splice_dentry(dn, in); in ceph_readdir_prepopulate()
1699 d_drop(dn); in ceph_readdir_prepopulate()
1702 dn = realdn; in ceph_readdir_prepopulate()
1705 ceph_dentry(dn)->offset = rde->offset; in ceph_readdir_prepopulate()
1708 update_dentry_lease(dn, rde->lease, req->r_session, in ceph_readdir_prepopulate()
1712 ret = fill_readdir_cache(d_inode(parent), dn, in ceph_readdir_prepopulate()
1718 if (dn) in ceph_readdir_prepopulate()
1719 dput(dn); in ceph_readdir_prepopulate()