Skip to content

Commit 4b12410

Browse files
committed
CIFS: Fix a wrong pointer in atomic_open
Commit 30d9049 caused a regression in cifs open codepath. Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
1 parent 28ea529 commit 4b12410

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎fs/cifs/dir.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
387387
struct cifs_tcon *tcon;
388388
__u16 fileHandle;
389389
__u32 oplock;
390-
struct file *filp;
391390
struct cifsFileInfo *pfile_info;
392391

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

420419
tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
421-
filp = ERR_CAST(tlink);
422420
if (IS_ERR(tlink))
423421
goto out_free_xid;
424422

@@ -436,10 +434,9 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
436434
goto out;
437435
}
438436

439-
pfile_info = cifs_new_fileinfo(fileHandle, filp, tlink, oplock);
437+
pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock);
440438
if (pfile_info == NULL) {
441439
CIFSSMBClose(xid, tcon, fileHandle);
442-
fput(filp);
443440
rc = -ENOMEM;
444441
}
445442

0 commit comments

Comments
 (0)