dp                552 kernel/fs.c    dirlookup(struct inode *dp, char *name, uint *poff)
dp                557 kernel/fs.c      if(dp->type != T_DIR)
dp                560 kernel/fs.c      for(off = 0; off < dp->size; off += sizeof(de)){
dp                561 kernel/fs.c        if(readi(dp, 0, (uint64)&de, off, sizeof(de)) != sizeof(de))
dp                570 kernel/fs.c          return iget(dp->dev, inum);
dp                580 kernel/fs.c    dirlink(struct inode *dp, char *name, uint inum)
dp                587 kernel/fs.c      if((ip = dirlookup(dp, name, 0)) != 0){
dp                593 kernel/fs.c      for(off = 0; off < dp->size; off += sizeof(de)){
dp                594 kernel/fs.c        if(readi(dp, 0, (uint64)&de, off, sizeof(de)) != sizeof(de))
dp                602 kernel/fs.c      if(writei(dp, 0, (uint64)&de, off, sizeof(de)) != sizeof(de))
dp                127 kernel/sysfile.c   struct inode *dp, *ip;
dp                149 kernel/sysfile.c   if((dp = nameiparent(new, name)) == 0)
dp                151 kernel/sysfile.c   ilock(dp);
dp                152 kernel/sysfile.c   if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
dp                153 kernel/sysfile.c     iunlockput(dp);
dp                156 kernel/sysfile.c   iunlockput(dp);
dp                174 kernel/sysfile.c isdirempty(struct inode *dp)
dp                179 kernel/sysfile.c   for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
dp                180 kernel/sysfile.c     if(readi(dp, 0, (uint64)&de, off, sizeof(de)) != sizeof(de))
dp                191 kernel/sysfile.c   struct inode *ip, *dp;
dp                200 kernel/sysfile.c   if((dp = nameiparent(path, name)) == 0){
dp                205 kernel/sysfile.c   ilock(dp);
dp                211 kernel/sysfile.c   if((ip = dirlookup(dp, name, &off)) == 0)
dp                223 kernel/sysfile.c   if(writei(dp, 0, (uint64)&de, off, sizeof(de)) != sizeof(de))
dp                226 kernel/sysfile.c     dp->nlink--;
dp                227 kernel/sysfile.c     iupdate(dp);
dp                229 kernel/sysfile.c   iunlockput(dp);
dp                240 kernel/sysfile.c   iunlockput(dp);
dp                248 kernel/sysfile.c   struct inode *ip, *dp;
dp                251 kernel/sysfile.c   if((dp = nameiparent(path, name)) == 0)
dp                254 kernel/sysfile.c   ilock(dp);
dp                256 kernel/sysfile.c   if((ip = dirlookup(dp, name, 0)) != 0){
dp                257 kernel/sysfile.c     iunlockput(dp);
dp                265 kernel/sysfile.c   if((ip = ialloc(dp->dev, type)) == 0){
dp                266 kernel/sysfile.c     iunlockput(dp);
dp                278 kernel/sysfile.c     if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
dp                282 kernel/sysfile.c   if(dirlink(dp, name, ip->inum) < 0)
dp                287 kernel/sysfile.c     dp->nlink++;  // for ".."
dp                288 kernel/sysfile.c     iupdate(dp);
dp                291 kernel/sysfile.c   iunlockput(dp);
dp                300 kernel/sysfile.c   iunlockput(dp);