Print this page
patch tsoome-feedback

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb_kshare.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb_kshare.c
↓ open down ↓ 420 lines elided ↑ open up ↑
 421  421  
 422  422                  /* smb_kshare_export consumes shr so it's not leaked */
 423  423                  if ((rc = smb_kshare_export(sv, shr)) != 0) {
 424  424                          smb_kshare_destroy(shr);
 425  425                          continue;
 426  426                  }
 427  427          }
 428  428          rc = 0;
 429  429  
 430  430  out:
 431      -        if (shrlist != NULL)
 432      -                nvlist_free(shrlist);
      431 +        nvlist_free(shrlist);
 433  432          smb_server_release(sv);
 434  433          return (rc);
 435  434  }
 436  435  
 437  436  /*
 438  437   * This function is invoked when a share is disabled to disconnect trees
 439  438   * and close files.  Cleaning up may involve VOP and/or VFS calls, which
 440  439   * may conflict/deadlock with stuck threads if something is amiss with the
 441  440   * file system.  Queueing the request for asynchronous processing allows the
 442  441   * call to return immediately so that, if the unshare is being done in the
↓ open down ↓ 40 lines elided ↑ open up ↑
 483  482  
 484  483                  smb_slist_insert_tail(&sv->sv_export.e_unexport_list, ux);
 485  484                  unexport = B_TRUE;
 486  485          }
 487  486  
 488  487          if (unexport)
 489  488                  smb_thread_signal(&sv->sv_export.e_unexport_thread);
 490  489          rc = 0;
 491  490  
 492  491  out:
 493      -        if (shrlist != NULL)
 494      -                nvlist_free(shrlist);
      492 +        nvlist_free(shrlist);
 495  493          smb_server_release(sv);
 496  494          return (rc);
 497  495  }
 498  496  
 499  497  /*
 500  498   * Get properties (currently only shortname enablement)
 501  499   * of specified share.
 502  500   */
 503  501  int
 504  502  smb_kshare_info(smb_ioc_shareinfo_t *ioc)
↓ open down ↓ 727 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX