From patchwork Thu Apr 4 06:16:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2390601 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A95AADF25A for ; Thu, 4 Apr 2013 06:16:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756447Ab3DDGQX (ORCPT ); Thu, 4 Apr 2013 02:16:23 -0400 Received: from mail-bk0-f41.google.com ([209.85.214.41]:62657 "EHLO mail-bk0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756434Ab3DDGQW (ORCPT ); Thu, 4 Apr 2013 02:16:22 -0400 Received: by mail-bk0-f41.google.com with SMTP id i18so1278145bkv.0 for ; Wed, 03 Apr 2013 23:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=x8OMIunjp1crd7POwF7CdkGH6sHuQRmx1K3cbsZcjOM=; b=yN7In/ZeqiQAHtnsKVZCbj0t8lq2d8KT5pJCkUM6WRNqszP5xQFagz0jruWufd80U7 SQg5doW+FsvhL6hHPyYJ6xAC6get0hYIihfyhrkWQLIBZnLDCrFY72OA07uDIrUYnsJP +pglTBU5oTljHQT063+Mz/gvio5lvcu8dfP/M7q1CP4b05rjCv6ZFvOueAv8tgqiZl+O jRSsqabAd78AhmFUIprAOZUkyAySllQwM5nn704uboIwNyNtoVDJ5x6tKO7FOuro3Ep9 FKVpipkw30W1GrB9CvyG8IZGNbWEfj7QHrVu8QiPT7oCl9bA4oA64BT7Vkc3QVPXZx3a VedA== MIME-Version: 1.0 X-Received: by 10.205.32.208 with SMTP id sl16mr3354129bkb.27.1365056181578; Wed, 03 Apr 2013 23:16:21 -0700 (PDT) Received: by 10.204.30.210 with HTTP; Wed, 3 Apr 2013 23:16:21 -0700 (PDT) Date: Thu, 4 Apr 2013 14:16:21 +0800 Message-ID: Subject: [PATCH -next] CIFS: fix error return code in cifs_atomic_open() From: Wei Yongjun To: sfrench@samba.org Cc: yongjun_wei@trendmicro.com.cn, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org From: Wei Yongjun 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 --- fs/cifs/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 46e455e..5699b50 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;