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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
Wei Yongjun 2013-04-04 14:16:21 +08:00 committed by Steve French
parent 0124cc4511
commit efb79f289f
1 changed files with 3 additions and 1 deletions

View File

@ -457,8 +457,10 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
inode, direntry->d_name.name, direntry);
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;
}
tcon = tlink_tcon(tlink);
server = tcon->ses->server;