Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200446
b: refs/heads/master
c: 47c78b7
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton committed Jun 16, 2010
1 parent 498c136 commit 73a2739
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: d9d5d8df953a98621be5b8889e05043d6e32052e
refs/heads/master: 47c78b7f40a9931a264e3c9bddccacdf8dfb9a30
17 changes: 11 additions & 6 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,20 @@ int cifs_open(struct inode *inode, struct file *file)
/* no need for special case handling of setting mode
on read only files needed here */

rc = cifs_posix_open_inode_helper(inode, file,
pCifsInode, oplock, netfid);
if (rc != 0) {
CIFSSMBClose(xid, tcon, netfid);
goto out;
}

pCifsFile = cifs_new_fileinfo(inode, netfid, file,
file->f_path.mnt,
oflags);
if (pCifsFile == NULL) {
CIFSSMBClose(xid, tcon, netfid);
rc = -ENOMEM;
goto out;
}

rc = cifs_posix_open_inode_helper(inode, file,
pCifsInode, oplock, netfid);
goto out;
} else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
if (tcon->ses->serverNOS)
Expand Down Expand Up @@ -359,15 +362,17 @@ int cifs_open(struct inode *inode, struct file *file)
goto out;
}

rc = cifs_open_inode_helper(inode, tcon, &oplock, buf, full_path, xid);
if (rc != 0)
goto out;

pCifsFile = cifs_new_fileinfo(inode, netfid, file, file->f_path.mnt,
file->f_flags);
if (pCifsFile == NULL) {
rc = -ENOMEM;
goto out;
}

rc = cifs_open_inode_helper(inode, tcon, &oplock, buf, full_path, xid);

if (oplock & CIFS_CREATE_ACTION) {
/* time to set mode which we can not set earlier due to
problems creating new read-only files */
Expand Down

0 comments on commit 73a2739

Please sign in to comment.