o Added system hang-up process when VOP_READDIR of unionfs_nodeget()

returns not end of the file status on debug mode (DIAGNOSTIC defined)
  kernel.

Submitted by:	Masanori OZAWA (ozawa@ongs.co.jp)
MFC after:	1 week
This commit is contained in:
Daichi GOTO 2008-04-25 07:58:19 +00:00
parent 2be1a816b9
commit a68ae31c71
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178478

View File

@ -989,8 +989,14 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td)
uio.uio_resid = iov.iov_len;
error = VOP_READDIR(lvp, &uio, cred, &eofflag, NULL, NULL);
if (error)
if (error != 0)
break;
if (eofflag == 0 && uio.uio_resid == sizeof(buf)) {
#ifdef DIAGNOSTIC
panic("bad readdir response from lower FS.");
#endif
break;
}
edp = (struct dirent*)&buf[sizeof(buf) - uio.uio_resid];
for (dp = (struct dirent*)buf; !error && dp < edp;