Print this page
5513 KM_NORMALPRI should be documented in kmem_alloc(9f) and kmem_cache_create(9f) man pages
14465 Present KM_NOSLEEP_LAZY as documented interface
Change-Id: I002ec28ddf390650f1fcba1ca94f6abfdb241439

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb2_fsctl_copychunk.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb2_fsctl_copychunk.c
↓ open down ↓ 196 lines elided ↑ open up ↑
 197  197  
 198  198          /*
 199  199           * Get a buffer used for copying, always
 200  200           * smb2_copychunk_max_seg (1M)
 201  201           *
 202  202           * Rather than sleep for this relatively large allocation,
 203  203           * allow the allocation to fail and return an error.
 204  204           * The client should then fall back to normal copy.
 205  205           */
 206  206          args->bufsize = smb2_copychunk_max_seg;
 207      -        args->buffer = kmem_alloc(args->bufsize, KM_NOSLEEP | KM_NORMALPRI);
      207 +        args->buffer = kmem_alloc(args->bufsize, KM_NOSLEEP_LAZY);
 208  208          if (args->buffer == NULL) {
 209  209                  status = NT_STATUS_INSUFF_SERVER_RESOURCES;
 210  210                  goto out;
 211  211          }
 212  212  
 213  213          /*
 214  214           * Finally, do the I/O
 215  215           */
 216  216          if (aapl_copyfile) {
 217  217                  status = smb2_fsctl_copychunk_aapl(sr, src_of, &ccr);
↓ open down ↓ 288 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX