Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1043898ybl; Tue, 3 Dec 2019 00:18:38 -0800 (PST) X-Google-Smtp-Source: APXvYqzvXbv39KuFXrCP5MzdySovM6oXw9EZqSXQIGK5oy+yGw5pA399HB5JjUMlgFrlITYdpPEy X-Received: by 2002:a9d:5552:: with SMTP id h18mr2208062oti.122.1575361118761; Tue, 03 Dec 2019 00:18:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575361118; cv=none; d=google.com; s=arc-20160816; b=N9Lmz46crlMseVtUDaFn++xVoRgo0dlj1LgHHfZfo8nDp1xAIbDTbt7i2MzZhO5eQz sYt+JwIHAspfXy3Wk00ELrQwz+Om400qztbvTP86gnwYT71Y+PwoR1/25yyR76YTi5EL m/ixu+Yg3PhrmKG8fTZpmD6spVYGhTu8y69CrsS0j4fRAbJMERtjU01AA0/wX2suFYu8 y1UJ8Xn7r7I4gVMakT1DWAz7jIWTKcm4Fx2aSMOLWEED4JCOpEHxDN2gcYAnXwvwFC2/ g13MWbiIp2ztc4Oj39ZGw9XBF8wmCpUqeQSBBPX18W6EPRFWNZbLVuz4mD8clD8ffvLP Reag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to; bh=tSAVXdMjYmLQeCI1XIbum/KOn9SOiywsY2MVILOf9uw=; b=f+AOT/K8Aqm1lZJABf+x1GxIV4hlp5cCQonFrtbczTe48wuk+jXLOkqX9DavSJP1GM iAdE8zdC+diAZzZp8MM6NMGWsIGOSwPm2kELGWx+AU6TNA9mq5EaXGPm5zWBTTqPQwua 3uPfaciygeacuUJ+DooOpxBDcptzMsFcavgzMuv9ALntj91Tps6SPU3PDYu5UzLHq0sI 1UoGT3E3Qrvb6DKiffEBhFZX1OFNnDnp/vhRpZvvQZtpfH0YAKIT2Cq0HJ4JUvPsvFn6 iJ41v3w5nfdyaR0x5XooxZMrSFFW0L47pz7cMI6jqrrCw2cI0dZYoIxzothHgufJi20W 5XCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si823319otk.270.2019.12.03.00.18.26; Tue, 03 Dec 2019 00:18:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbfLCIQz (ORCPT + 99 others); Tue, 3 Dec 2019 03:16:55 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:51326 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726186AbfLCIQz (ORCPT ); Tue, 3 Dec 2019 03:16:55 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 755A1C86D53108544065; Tue, 3 Dec 2019 16:16:52 +0800 (CST) Received: from [127.0.0.1] (10.177.251.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 3 Dec 2019 16:16:45 +0800 To: , , , , , "hushiyuan@huawei.com" , "linfeilong@huawei.com" From: Yunfeng Ye Subject: [PATCH] btrfs: remove unused condition check in btrfs_page_mkwrite() Message-ID: Date: Tue, 3 Dec 2019 16:16:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.251.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The condition '!ret2' is always true. so remove the unused condition check. Signed-off-by: Yunfeng Ye --- fs/btrfs/inode.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 56032c518b26..eef2432597e2 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9073,7 +9073,6 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf) ret = VM_FAULT_SIGBUS; goto out_unlock; } - ret2 = 0; /* page is wholly or partially inside EOF */ if (page_start + PAGE_SIZE > size) @@ -9097,12 +9096,10 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf) unlock_extent_cached(io_tree, page_start, page_end, &cached_state); - if (!ret2) { - btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE); - sb_end_pagefault(inode->i_sb); - extent_changeset_free(data_reserved); - return VM_FAULT_LOCKED; - } + btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE); + sb_end_pagefault(inode->i_sb); + extent_changeset_free(data_reserved); + return VM_FAULT_LOCKED; out_unlock: unlock_page(page); -- 2.7.4