From 95c7282130cd928411befa985c505b26bf04f8d0 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 25 Sep 2009 09:53:37 -0400 Subject: [PATCH] --- yaml --- r: 166368 b: refs/heads/master c: 3321b791b2e8897323f8c044a0c77ff25781381c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/file.c | 22 +++------------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 7db82152191e..b28a604a5763 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 15dd478107fb110689ef09d276d84051b31b7e5c +refs/heads/master: 3321b791b2e8897323f8c044a0c77ff25781381c diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index fee993c92f1a..429337eb7afe 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -201,17 +201,6 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, struct timespec temp; int rc; - /* want handles we can use to read with first - in the list so we do not have to walk the - list to search for one in write_begin */ - if ((file->f_flags & O_ACCMODE) == O_WRONLY) { - list_add_tail(&pCifsFile->flist, - &pCifsInode->openFileList); - } else { - list_add(&pCifsFile->flist, - &pCifsInode->openFileList); - } - write_unlock(&GlobalSMBSeslock); if (pCifsInode->clientCanCacheRead) { /* we have the inode open somewhere else no need to discard cache data */ @@ -397,6 +386,7 @@ int cifs_open(struct inode *inode, struct file *file) cFYI(1, ("cifs_open returned 0x%x", rc)); goto out; } + pCifsFile = cifs_new_fileinfo(inode, netfid, file, file->f_path.mnt, file->f_flags); file->private_data = pCifsFile; @@ -405,14 +395,8 @@ int cifs_open(struct inode *inode, struct file *file) goto out; } - pCifsInode = CIFS_I(file->f_path.dentry->d_inode); - if (pCifsInode) { - rc = cifs_open_inode_helper(inode, file, pCifsInode, - pCifsFile, tcon, - &oplock, buf, full_path, xid); - } else { - write_unlock(&GlobalSMBSeslock); - } + rc = cifs_open_inode_helper(inode, file, pCifsInode, pCifsFile, tcon, + &oplock, buf, full_path, xid); if (oplock & CIFS_CREATE_ACTION) { /* time to set mode which we can not set earlier due to