From cdff08e76612e53580139653403aedea979aa639 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 21 Oct 2010 22:46:14 +0000 Subject: [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 Reviewed-by: Suresh Jayaraman Signed-off-by: Steve French --- fs/cifs/misc.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'fs/cifs/misc.c') 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) if (pSMB->Fid != netfile->netfid) continue; - /* - * don't do anything if file is about to be - * closed anyway. - */ - if (netfile->closePend) { - spin_unlock(&cifs_file_list_lock); - spin_unlock(&cifs_tcp_ses_lock); - return true; - } - cFYI(1, "file id match, oplock break"); pCifsInode = CIFS_I(netfile->dentry->d_inode); pCifsInode->clientCanCacheAll = false; -- cgit v1.2.3