diff options
author | kib <kib@FreeBSD.org> | 2011-04-09 21:40:48 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-04-09 21:40:48 +0000 |
commit | 57028bd2e65524bafc89c4d6bb33bbcb45783d5c (patch) | |
tree | e3619b1facc8a2ccb34c80318d35a4e0e0a7c29d /sys | |
parent | 153b81554cb794fe75370f094f6cd8c6c52fa7d2 (diff) | |
download | FreeBSD-src-57028bd2e65524bafc89c4d6bb33bbcb45783d5c.zip FreeBSD-src-57028bd2e65524bafc89c4d6bb33bbcb45783d5c.tar.gz |
Linuxolator calls VOP_READDIR with ncookies pointer. Implement a
workaround for fdescfs to not panic when ncookies is not NULL, similar
to the one committed as r152254, but simpler, due to fdescfs_readdir()
not calling vfs_read_dirent().
PR: kern/156177
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 0248a30..e11b59c 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -500,16 +500,12 @@ fdesc_readdir(ap) struct dirent *dp = &d; int error, i, off, fcnt; - /* - * We don't allow exporting fdesc mounts, and currently local - * requests do not need cookies. - */ - if (ap->a_ncookies) - panic("fdesc_readdir: not hungry"); - if (VTOFDESC(ap->a_vp)->fd_type != Froot) panic("fdesc_readdir: not dir"); + if (ap->a_ncookies != NULL) + *ap->a_ncookies = 0; + off = (int)uio->uio_offset; if (off != uio->uio_offset || off < 0 || (u_int)off % UIO_MX != 0 || uio->uio_resid < UIO_MX) |