Changeset 989 for vendor/current/source3/smbd/close.c
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/close.c
r988 r989 169 169 TALLOC_CTX *frame = talloc_stackframe(); 170 170 NTSTATUS status; 171 bool saved_posix_pathnames; 171 172 172 173 status = vfs_streaminfo(conn, NULL, fname, talloc_tos(), … … 192 193 return NT_STATUS_OK; 193 194 } 195 196 /* 197 * Any stream names *must* be treated as Windows 198 * pathnames, even if we're using UNIX extensions. 199 */ 200 201 saved_posix_pathnames = lp_set_posix_pathnames(false); 194 202 195 203 for (i=0; i<num_streams; i++) { … … 224 232 225 233 fail: 234 235 (void)lp_set_posix_pathnames(saved_posix_pathnames); 226 236 TALLOC_FREE(frame); 227 237 return status; … … 247 257 bool got_tokens = false; 248 258 bool normal_close; 249 int ret_flock;250 259 251 260 /* Ensure any pending write time updates are done. */ … … 268 277 "lock for file %s\n", fsp_str_dbg(fsp))); 269 278 return NT_STATUS_INVALID_PARAMETER; 279 } 280 281 /* Remove the oplock before potentially deleting the file. */ 282 if(fsp->oplock_type) { 283 remove_oplock_under_lock(fsp, lck); 270 284 } 271 285 … … 471 485 } 472 486 473 /* remove filesystem sharemodes */ 474 ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0); 475 if (ret_flock == -1) { 476 DEBUG(2, ("close_remove_share_mode: removing kernel flock for " 477 "%s failed: %s\n", fsp_str_dbg(fsp), 478 strerror(errno))); 487 if (fsp->kernel_share_modes_taken) { 488 int ret_flock; 489 490 /* remove filesystem sharemodes */ 491 ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0); 492 if (ret_flock == -1) { 493 DEBUG(2, ("close_remove_share_mode: removing kernel " 494 "flock for %s failed: %s\n", 495 fsp_str_dbg(fsp), strerror(errno))); 496 } 479 497 } 480 498 … … 732 750 file_free(req, fsp); 733 751 return NT_STATUS_OK; 734 }735 736 /* Remove the oplock before potentially deleting the file. */737 if(fsp->oplock_type) {738 remove_oplock(fsp);739 752 } 740 753
Note:
See TracChangeset
for help on using the changeset viewer.