From patchwork Mon Aug 17 08:46:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ma, Jianpeng" X-Patchwork-Id: 7023921 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B73B79F344 for ; Mon, 17 Aug 2015 08:46:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E680B205F0 for ; Mon, 17 Aug 2015 08:46:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92A20205DD for ; Mon, 17 Aug 2015 08:46:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754053AbbHQIqd (ORCPT ); Mon, 17 Aug 2015 04:46:33 -0400 Received: from mga09.intel.com ([134.134.136.24]:22730 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913AbbHQIqc convert rfc822-to-8bit (ORCPT ); Mon, 17 Aug 2015 04:46:32 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 17 Aug 2015 01:46:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,693,1432623600"; d="scan'208";a="785143270" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by fmsmga002.fm.intel.com with ESMTP; 17 Aug 2015 01:46:30 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 17 Aug 2015 16:46:18 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.171]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.210]) with mapi id 14.03.0224.002; Mon, 17 Aug 2015 16:46:17 +0800 From: "Ma, Jianpeng" To: "sage@redhat.com" CC: "ceph-devel@vger.kernel.org" , "zyan@redhat.com" Subject: [PATCH ] fs/ceph: Remove the useless judgement. Thread-Topic: [PATCH ] fs/ceph: Remove the useless judgement. Thread-Index: AdDYyRQ4YOJf1PUEQ/2rEIW5Mj/FaQ== Date: Mon, 17 Aug 2015 08:46:17 +0000 Message-ID: <6AA21C22F0A5DA478922644AD2EC308C1D19FC1F@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For ret != 0, it already handle. So skip this. Signed-off-by: Jianpeng Ma --- fs/ceph/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" 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/ceph/file.c b/fs/ceph/file.c index 5ecd3dc..17cc357 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -276,7 +276,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, if (err) goto out_req; - if (err == 0 && (flags & O_CREAT) && !req->r_reply_info.head->is_dentry) + if ((flags & O_CREAT) && !req->r_reply_info.head->is_dentry) err = ceph_handle_notrace_create(dir, dentry); if (d_unhashed(dentry)) {