Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs Change zfs_readdi...



details:   https://anonhg.NetBSD.org/src/rev/484e182f3f63
branches:  trunk
changeset: 449723:484e182f3f63
user:      hannken <hannken%NetBSD.org@localhost>
date:      Mon Mar 18 09:19:39 2019 +0000

description:
Change zfs_readdir() to use malloc() instead of kmem_alloc() to
allocate cookies.  Required by protocol, caller uses free().

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r c586f58c10a1 -r 484e182f3f63 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Mon Mar 18 09:03:08 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Mon Mar 18 09:19:39 2019 +0000
@@ -85,6 +85,7 @@
 #include <miscfs/genfs/genfs_node.h>
 #include <uvm/uvm_extern.h>
 #include <sys/fstrans.h>
+#include <sys/malloc.h>
 
 uint_t zfs_putpage_key;
 #endif
@@ -2754,7 +2755,7 @@
 #endif
 #ifdef __NetBSD__
                ncooks = uio->uio_resid / _DIRENT_MINSIZE(odp);
-               cooks = kmem_alloc(ncooks * sizeof(off_t), KM_SLEEP);
+               cooks = malloc(ncooks * sizeof(off_t), M_TEMP, M_WAITOK);
 #endif
                *cookies = cooks;
                *ncookies = ncooks;



Home | Main Index | Thread Index | Old Index