Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efb79f28 authored by Wei Yongjun's avatar Wei Yongjun Committed by Steve French
Browse files

CIFS: fix error return code in cifs_atomic_open()



Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 0124cc45
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -457,8 +457,10 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
		 inode, direntry->d_name.name, direntry);
		 inode, direntry->d_name.name, direntry);


	tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
	tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
	if (IS_ERR(tlink))
	if (IS_ERR(tlink)) {
		rc = PTR_ERR(tlink);
		goto out_free_xid;
		goto out_free_xid;
	}


	tcon = tlink_tcon(tlink);
	tcon = tlink_tcon(tlink);
	server = tcon->ses->server;
	server = tcon->ses->server;