aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ebdbe62a829c..97ce4bf89d15 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -493,9 +493,9 @@ static int cifs_reopen_file(struct file *file, bool can_flush)
493 return -EBADF; 493 return -EBADF;
494 494
495 xid = GetXid(); 495 xid = GetXid();
496 mutex_unlock(&pCifsFile->fh_mutex); 496 mutex_lock(&pCifsFile->fh_mutex);
497 if (!pCifsFile->invalidHandle) { 497 if (!pCifsFile->invalidHandle) {
498 mutex_lock(&pCifsFile->fh_mutex); 498 mutex_unlock(&pCifsFile->fh_mutex);
499 rc = 0; 499 rc = 0;
500 FreeXid(xid); 500 FreeXid(xid);
501 return rc; 501 return rc;
@@ -527,7 +527,7 @@ static int cifs_reopen_file(struct file *file, bool can_flush)
527 if (full_path == NULL) { 527 if (full_path == NULL) {
528 rc = -ENOMEM; 528 rc = -ENOMEM;
529reopen_error_exit: 529reopen_error_exit:
530 mutex_lock(&pCifsFile->fh_mutex); 530 mutex_unlock(&pCifsFile->fh_mutex);
531 FreeXid(xid); 531 FreeXid(xid);
532 return rc; 532 return rc;
533 } 533 }
@@ -569,14 +569,14 @@ reopen_error_exit:
569 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & 569 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
570 CIFS_MOUNT_MAP_SPECIAL_CHR); 570 CIFS_MOUNT_MAP_SPECIAL_CHR);
571 if (rc) { 571 if (rc) {
572 mutex_lock(&pCifsFile->fh_mutex); 572 mutex_unlock(&pCifsFile->fh_mutex);
573 cFYI(1, ("cifs_open returned 0x%x", rc)); 573 cFYI(1, ("cifs_open returned 0x%x", rc));
574 cFYI(1, ("oplock: %d", oplock)); 574 cFYI(1, ("oplock: %d", oplock));
575 } else { 575 } else {
576reopen_success: 576reopen_success:
577 pCifsFile->netfid = netfid; 577 pCifsFile->netfid = netfid;
578 pCifsFile->invalidHandle = false; 578 pCifsFile->invalidHandle = false;
579 mutex_lock(&pCifsFile->fh_mutex); 579 mutex_unlock(&pCifsFile->fh_mutex);
580 pCifsInode = CIFS_I(inode); 580 pCifsInode = CIFS_I(inode);
581 if (pCifsInode) { 581 if (pCifsInode) {
582 if (can_flush) { 582 if (can_flush) {