diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-10-16 09:58:10 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2020-10-16 09:58:10 +0000 |
commit | ce764cbd1c725c54966315949fe93eb3994c1b5e (patch) | |
tree | 09b5dec74d141a59ee4367f2e0ffdcb199474435 /sys/fs | |
parent | a59b0ac3aaa16dbceca8e2f6dc4d57f458e129de (diff) | |
download | src-test2-ce764cbd1c725c54966315949fe93eb3994c1b5e.tar.gz src-test2-ce764cbd1c725c54966315949fe93eb3994c1b5e.zip |
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/pseudofs/pseudofs_vnops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 75981d8b5350..49ef255b1253 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -68,6 +68,8 @@ __FBSDID("$FreeBSD$"); KASSERT((pn)->pn_type == pfstype_symlink, \ ("%s(): VLNK vnode refers to non-link pfs_node", __func__)) +#define PFS_MAXBUFSIZ 1024 * 1024 + /* * Returns the fileno, adjusted for target pid */ @@ -677,8 +679,8 @@ pfs_read(struct vop_read_args *va) goto ret; } buflen = uio->uio_offset + uio->uio_resid; - if (buflen > MAXPHYS) - buflen = MAXPHYS; + if (buflen > PFS_MAXBUFSIZ) + buflen = PFS_MAXBUFSIZ; sb = sbuf_new(sb, NULL, buflen + 1, 0); if (sb == NULL) { |