aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-05-17 18:53:14 -0400
committerTony Luck <tony.luck@intel.com>2005-05-17 18:53:14 -0400
commit325a479c4c110db278ef3361460a48c4093252cc (patch)
treebcfbf4d0647d9442045639a5c19da59d55190e81 /fs/cifs/file.c
parentebcc80c1b6629a445f7471cc1ddb48faf8a84e70 (diff)
parent7f9eaedf894dbaa08c157832e9a6c9c03ffed1ed (diff)
Merge with temp tree to get David's gdb inferior calls patch
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index dcab7cf1b53b..dde2d251fc3d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -254,7 +254,8 @@ int cifs_open(struct inode *inode, struct file *file)
254 } 254 }
255 rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess, 255 rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess,
256 CREATE_NOT_DIR, &netfid, &oplock, buf, 256 CREATE_NOT_DIR, &netfid, &oplock, buf,
257 cifs_sb->local_nls); 257 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags
258 & CIFS_MOUNT_MAP_SPECIAL_CHR);
258 if (rc) { 259 if (rc) {
259 cFYI(1, ("cifs_open returned 0x%x ", rc)); 260 cFYI(1, ("cifs_open returned 0x%x ", rc));
260 goto out; 261 goto out;
@@ -287,7 +288,9 @@ int cifs_open(struct inode *inode, struct file *file)
287 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 288 CIFSSMBUnixSetPerms(xid, pTcon, full_path,
288 inode->i_mode, 289 inode->i_mode,
289 (__u64)-1, (__u64)-1, 0 /* dev */, 290 (__u64)-1, (__u64)-1, 0 /* dev */,
290 cifs_sb->local_nls); 291 cifs_sb->local_nls,
292 cifs_sb->mnt_cifs_flags &
293 CIFS_MOUNT_MAP_SPECIAL_CHR);
291 } else { 294 } else {
292 /* BB implement via Windows security descriptors eg 295 /* BB implement via Windows security descriptors eg
293 CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, 296 CIFSSMBWinSetPerms(xid, pTcon, full_path, mode,
@@ -387,7 +390,8 @@ static int cifs_reopen_file(struct inode *inode, struct file *file,
387 } */ 390 } */
388 rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess, 391 rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess,
389 CREATE_NOT_DIR, &netfid, &oplock, NULL, 392 CREATE_NOT_DIR, &netfid, &oplock, NULL,
390 cifs_sb->local_nls); 393 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
394 CIFS_MOUNT_MAP_SPECIAL_CHR);
391 if (rc) { 395 if (rc) {
392 up(&pCifsFile->fh_sem); 396 up(&pCifsFile->fh_sem);
393 cFYI(1, ("cifs_open returned 0x%x ", rc)); 397 cFYI(1, ("cifs_open returned 0x%x ", rc));
@@ -465,8 +469,10 @@ int cifs_close(struct inode *inode, struct file *file)
465 write_lock(&file->f_owner.lock); 469 write_lock(&file->f_owner.lock);
466 } 470 }
467 } 471 }
472 write_lock(&GlobalSMBSeslock);
468 list_del(&pSMBFile->flist); 473 list_del(&pSMBFile->flist);
469 list_del(&pSMBFile->tlist); 474 list_del(&pSMBFile->tlist);
475 write_unlock(&GlobalSMBSeslock);
470 write_unlock(&file->f_owner.lock); 476 write_unlock(&file->f_owner.lock);
471 kfree(pSMBFile->search_resume_name); 477 kfree(pSMBFile->search_resume_name);
472 kfree(file->private_data); 478 kfree(file->private_data);
@@ -506,7 +512,8 @@ int cifs_closedir(struct inode *inode, struct file *file)
506 pTcon = cifs_sb->tcon; 512 pTcon = cifs_sb->tcon;
507 513
508 cFYI(1, ("Freeing private data in close dir")); 514 cFYI(1, ("Freeing private data in close dir"));
509 if (pCFileStruct->srch_inf.endOfSearch == FALSE) { 515 if ((pCFileStruct->srch_inf.endOfSearch == FALSE) &&
516 (pCFileStruct->invalidHandle == FALSE)) {
510 pCFileStruct->invalidHandle = TRUE; 517 pCFileStruct->invalidHandle = TRUE;
511 rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid); 518 rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid);
512 cFYI(1, ("Closing uncompleted readdir with rc %d", 519 cFYI(1, ("Closing uncompleted readdir with rc %d",