From: Wei Yongjun Date: Thu, 4 Apr 2013 06:16:21 +0000 (+0800) Subject: CIFS: fix error return code in cifs_atomic_open() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=efb79f289f0a7e7fbfc82f78959093bf7d1558b9;p=deliverable%2Flinux.git 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 Reviewed-by: Jeff Layton Signed-off-by: Steve French Signed-off-by: Steve French --- diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 46e455ece573..5699b5036ed8 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -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;