diff options
author | Steve French <sfrench@us.ibm.com> | 2010-10-21 18:46:14 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-21 18:46:14 -0400 |
commit | cdff08e76612e53580139653403aedea979aa639 (patch) | |
tree | 1ebd74be361b7e34158974242a2303f7833c983d /fs/cifs/misc.c | |
parent | 3f9bcca7820a6711307b6499952b13cfcfc31dd6 (diff) |
[CIFS] move close processing from cifs_close to cifsFileInfo_put
Now that it's feasible for a cifsFileInfo to outlive the filp under
which it was created, move the close processing into cifsFileInfo_put.
This means that the last user of the filehandle always does the actual
on the wire close call. This also allows us to get rid of the closePend
flag from cifsFileInfo. If we have an active reference to the file
then it's never going to have a close pending.
cifs_close is converted to simply put the filehandle.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index a7b492c213cd..1c681f6a6803 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -567,16 +567,6 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
567 | if (pSMB->Fid != netfile->netfid) | 567 | if (pSMB->Fid != netfile->netfid) |
568 | continue; | 568 | continue; |
569 | 569 | ||
570 | /* | ||
571 | * don't do anything if file is about to be | ||
572 | * closed anyway. | ||
573 | */ | ||
574 | if (netfile->closePend) { | ||
575 | spin_unlock(&cifs_file_list_lock); | ||
576 | spin_unlock(&cifs_tcp_ses_lock); | ||
577 | return true; | ||
578 | } | ||
579 | |||
580 | cFYI(1, "file id match, oplock break"); | 570 | cFYI(1, "file id match, oplock break"); |
581 | pCifsInode = CIFS_I(netfile->dentry->d_inode); | 571 | pCifsInode = CIFS_I(netfile->dentry->d_inode); |
582 | pCifsInode->clientCanCacheAll = false; | 572 | pCifsInode->clientCanCacheAll = false; |