Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166368
b: refs/heads/master
c: 3321b79
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Sep 25, 2009
1 parent 0f72d85 commit 95c7282
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15dd478107fb110689ef09d276d84051b31b7e5c
refs/heads/master: 3321b791b2e8897323f8c044a0c77ff25781381c
22 changes: 3 additions & 19 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 95c7282

Please sign in to comment.