Skip to content

Commit

Permalink
CIFS: Fix a wrong pointer in atomic_open
Browse files Browse the repository at this point in the history
Commit 30d9049 caused a regression
in cifs open codepath.

Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Pavel Shilovsky <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
piastry committed Jul 24, 2012
1 parent 28ea529 commit 4b12410
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
struct cifs_tcon *tcon;
__u16 fileHandle;
__u32 oplock;
struct file *filp;
struct cifsFileInfo *pfile_info;

/* Posix open is only called (at lookup time) for file create now. For
Expand Down Expand Up @@ -418,7 +417,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
inode, direntry->d_name.name, direntry);

tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
filp = ERR_CAST(tlink);
if (IS_ERR(tlink))
goto out_free_xid;

Expand All @@ -436,10 +434,9 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
goto out;
}

pfile_info = cifs_new_fileinfo(fileHandle, filp, tlink, oplock);
pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock);
if (pfile_info == NULL) {
CIFSSMBClose(xid, tcon, fileHandle);
fput(filp);
rc = -ENOMEM;
}

Expand Down

0 comments on commit 4b12410

Please sign in to comment.