ino = (avc->fid.Fid.Volume << 16) + ntohl(de->fid.vnode);
ino &= 0x7fffffff; /* Assumes 32 bit ino_t ..... */
- len = strlen(de->name);
+ if (de->name)
+ len = strlen(de->name);
+ else {
+ printf("afs_linux_readdir: afs_dir_GetBlob failed, null name (inode %x, dirpos %d)\n",
+ &tdc->f.inode, dirpos);
+ DRelease(de, 0);
+ afs_PutDCache(tdc);
+ ReleaseReadLock(&avc->lock);
+ afs_PutFakeStat(&fakestat);
+ return -ENOENT;
+ }
/* filldir returns -EINVAL when the buffer is full. */
#if (defined(AFS_LINUX24_ENV) || defined(pgoff2loff)) && defined(DECLARE_FSTYPE)
goto done;
}
- /* A DNLC lookup failure cannot be trusted. Try a real lookup */
- code = afs_lookup(parentvcp, name, &lookupvcp, credp);
+ /* A DNLC lookup failure cannot be trusted. Try a real lookup.
+ Make sure to try the real name and not the @sys expansion;
+ afs_lookup will expand @sys itself. */
+
+ code = afs_lookup(parentvcp, dp->d_name.name, &lookupvcp, credp);
/* Verify that the dentry does not point to an old inode */
if (vcp != lookupvcp)