From patchwork Fri Mar 2 23:10:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 10255885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3788C60211 for ; Sat, 3 Mar 2018 00:16:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 284E1285E1 for ; Sat, 3 Mar 2018 00:16:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D4DD28604; Sat, 3 Mar 2018 00:16:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 871F7285E1 for ; Sat, 3 Mar 2018 00:16:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935327AbeCCAQw (ORCPT ); Fri, 2 Mar 2018 19:16:52 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:51352 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932890AbeCCAQv (ORCPT ); Fri, 2 Mar 2018 19:16:51 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w230Gomb019882 for ; Sat, 3 Mar 2018 00:16:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2017-10-26; bh=bERdMFZbOnFV1LSZXkirdYY+4Av9WCGC49VJtXDrNmQ=; b=sWG8ZiffR1rZMFTmxllWr17UXsUYB5+u96cpoAlPaSR7HL+onm+xC9feVaWRw9wip65O yf3WrX034HZIKcr7H2ldNjDOsNVZ+iBDjpzW/dsRHMSNSWaNF74MMqK4SECdECTTxxw0 1IEfrptBPd73va9T7MJE7qGMAFuTA4DB8BarLYIu3sI+j19qw2/KyeXqGq9Uv3sESxSX iAalTMO1ikMB7wMFhnPep/YymRrUkkB/1tfRDzE6ZKQ3FOc34IdoO/SszeE9UfWt39sl 9kNaA971iL6wNJrFdud0MoNNFEdbs4VUWsM5BDOypXI9A3/OwHAIjhtHismmwfbGEGZL yA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2gf4g1uadg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 03 Mar 2018 00:16:50 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w230G5CI008516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 3 Mar 2018 00:16:05 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w230G5Ei006158 for ; Sat, 3 Mar 2018 00:16:05 GMT Received: from dhcp-10-211-47-181.usdhcp.oraclecorp.com.com (/10.211.47.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 02 Mar 2018 16:16:05 -0800 From: Liu Bo To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: scrub: remove unnecessary variable set Date: Fri, 2 Mar 2018 16:10:40 -0700 Message-Id: <20180302231041.10442-4-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.9.4 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8820 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=5 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=555 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803030001 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Variable "success" is only checked when !sctx->is_dev_replace. Signed-off-by: Liu Bo --- fs/btrfs/scrub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index e3203a1..1b5ce2f 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -1444,7 +1444,6 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) page_num) != 0) { btrfs_dev_replace_stats_inc( &fs_info->dev_replace.num_write_errors); - success = 0; } } else if (sblock_other) { ret = scrub_repair_page_from_good_copy(sblock_bad,