Skip to content

Commit

Permalink
CIFS: fix error return code in cifs_atomic_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Steve French committed May 5, 2013
1 parent 0124cc4 commit efb79f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efb79f2

Please sign in to comment.