diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 616b140534be..e9c1573f6aa7 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -110,7 +110,6 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
110 | &pCifsInode->openFileList); | 110 | &pCifsInode->openFileList); |
111 | } | 111 | } |
112 | write_unlock(&GlobalSMBSeslock); | 112 | write_unlock(&GlobalSMBSeslock); |
113 | write_unlock(&file->f_owner.lock); | ||
114 | if (pCifsInode->clientCanCacheRead) { | 113 | if (pCifsInode->clientCanCacheRead) { |
115 | /* we have the inode open somewhere else | 114 | /* we have the inode open somewhere else |
116 | no need to discard cache data */ | 115 | no need to discard cache data */ |
@@ -287,7 +286,6 @@ int cifs_open(struct inode *inode, struct file *file) | |||
287 | goto out; | 286 | goto out; |
288 | } | 287 | } |
289 | pCifsFile = cifs_init_private(file->private_data, inode, file, netfid); | 288 | pCifsFile = cifs_init_private(file->private_data, inode, file, netfid); |
290 | write_lock(&file->f_owner.lock); | ||
291 | write_lock(&GlobalSMBSeslock); | 289 | write_lock(&GlobalSMBSeslock); |
292 | list_add(&pCifsFile->tlist, &pTcon->openFileList); | 290 | list_add(&pCifsFile->tlist, &pTcon->openFileList); |
293 | 291 | ||
@@ -298,7 +296,6 @@ int cifs_open(struct inode *inode, struct file *file) | |||
298 | &oplock, buf, full_path, xid); | 296 | &oplock, buf, full_path, xid); |
299 | } else { | 297 | } else { |
300 | write_unlock(&GlobalSMBSeslock); | 298 | write_unlock(&GlobalSMBSeslock); |
301 | write_unlock(&file->f_owner.lock); | ||
302 | } | 299 | } |
303 | 300 | ||
304 | if (oplock & CIFS_CREATE_ACTION) { | 301 | if (oplock & CIFS_CREATE_ACTION) { |
@@ -477,7 +474,6 @@ int cifs_close(struct inode *inode, struct file *file) | |||
477 | pTcon = cifs_sb->tcon; | 474 | pTcon = cifs_sb->tcon; |
478 | if (pSMBFile) { | 475 | if (pSMBFile) { |
479 | pSMBFile->closePend = TRUE; | 476 | pSMBFile->closePend = TRUE; |
480 | write_lock(&file->f_owner.lock); | ||
481 | if (pTcon) { | 477 | if (pTcon) { |
482 | /* no sense reconnecting to close a file that is | 478 | /* no sense reconnecting to close a file that is |
483 | already closed */ | 479 | already closed */ |
@@ -492,23 +488,18 @@ int cifs_close(struct inode *inode, struct file *file) | |||
492 | the struct would be in each open file, | 488 | the struct would be in each open file, |
493 | but this should give enough time to | 489 | but this should give enough time to |
494 | clear the socket */ | 490 | clear the socket */ |
495 | write_unlock(&file->f_owner.lock); | ||
496 | cERROR(1,("close with pending writes")); | 491 | cERROR(1,("close with pending writes")); |
497 | msleep(timeout); | 492 | msleep(timeout); |
498 | write_lock(&file->f_owner.lock); | ||
499 | timeout *= 4; | 493 | timeout *= 4; |
500 | } | 494 | } |
501 | write_unlock(&file->f_owner.lock); | ||
502 | rc = CIFSSMBClose(xid, pTcon, | 495 | rc = CIFSSMBClose(xid, pTcon, |
503 | pSMBFile->netfid); | 496 | pSMBFile->netfid); |
504 | write_lock(&file->f_owner.lock); | ||
505 | } | 497 | } |
506 | } | 498 | } |
507 | write_lock(&GlobalSMBSeslock); | 499 | write_lock(&GlobalSMBSeslock); |
508 | list_del(&pSMBFile->flist); | 500 | list_del(&pSMBFile->flist); |
509 | list_del(&pSMBFile->tlist); | 501 | list_del(&pSMBFile->tlist); |
510 | write_unlock(&GlobalSMBSeslock); | 502 | write_unlock(&GlobalSMBSeslock); |
511 | write_unlock(&file->f_owner.lock); | ||
512 | kfree(pSMBFile->search_resume_name); | 503 | kfree(pSMBFile->search_resume_name); |
513 | kfree(file->private_data); | 504 | kfree(file->private_data); |
514 | file->private_data = NULL; | 505 | file->private_data = NULL; |