From patchwork Tue Jan 16 12:17:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changwei Ge X-Patchwork-Id: 10166621 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 F1E3B60325 for ; Tue, 16 Jan 2018 12:19:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD86728517 for ; Tue, 16 Jan 2018 12:19:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CED5728521; Tue, 16 Jan 2018 12:19:25 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4469B28517 for ; Tue, 16 Jan 2018 12:19:25 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0GCHHJk027931; Tue, 16 Jan 2018 12:18:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : date : message-id : mime-version : cc : subject : list-id : list-unsubscribe : list-archive : list-post : list-help : list-subscribe : content-type : content-transfer-encoding : sender; s=corp-2017-10-26; bh=MJ4g7VdLgjPc3OYgOYbUxNfwWkyN5xHbo97pPjGJEgo=; b=Q3mellqflQgQiXV0oaVGT6cQVp7SzS0wRvgWQmVl5eGD4gePdHKkMfsi+5CNKHOU0azc ohxZEZ5SuBp1dfuibHRSxlBibHd8DyfdO4tpKUDk5bOOBg/OXS+S2I/TJpjGlQ/ZcXKJ S23AC2Ej6RqOp1+omJwAYW3/LMiGIL/5G3pjaChrD+3P2e8koN7qpg4OQa98Ob7jKmS1 z9CN9KSZH3RyMHagIzB/E7BMW0BCAhQuhYskiPlS8+jyergjXsTQUW0zDXayYypSX+cB Ga0qm+cx2osbpfsXSXvzgsRrto10Got8WUVN4QELhhOKP3Mj5983yV80gZ75A0gqLJ9v Ow== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2fhfdpgf9c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jan 2018 12:18:44 +0000 Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0GCIaJF019517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Jan 2018 12:18:37 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1ebQCK-0003uy-VO; Tue, 16 Jan 2018 04:18:36 -0800 Received: from aserv0022.oracle.com ([141.146.126.234]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1ebQCG-0003uN-I8 for ocfs2-devel@oss.oracle.com; Tue, 16 Jan 2018 04:18:33 -0800 Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0GCIVSn019380 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 16 Jan 2018 12:18:32 GMT Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0GCHGlb021242; Tue, 16 Jan 2018 12:18:31 GMT Received: from h3cmg01-ex.h3c.com (smtp.h3c.com [60.191.123.56]) by userp2040.oracle.com with ESMTP id 2fhfwx2jyv-1; Tue, 16 Jan 2018 12:18:31 +0000 Received: from BJHUB02-EX.srv.huawei-3com.com (unknown [10.63.20.170]) by h3cmg01-ex.h3c.com with smtp id 3180_0773_fe46e521_1dbf_40c9_a01d_6ebfec70d837; Tue, 16 Jan 2018 20:17:46 +0800 Received: from localhost.localdomain (10.125.136.231) by rndsmtp.h3c.com (10.63.20.175) with Microsoft SMTP Server id 14.3.248.2; Tue, 16 Jan 2018 20:17:34 +0800 From: Changwei Ge To: , , , Date: Tue, 16 Jan 2018 20:17:49 +0800 Message-ID: <1516105069-12643-1-git-send-email-ge.changwei@h3c.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.125.136.231] X-CLX-Shades: MLX X-CLX-Response: 1TFkXGx0eEQpMehcaEQpZTRdnZnIRCllJFxpxGhAadwYbHx5xHBIQGncGGBo GGhEKWV4XaG55EQpJRhdFWEtJRk91WlhFTl9JXkNFRBl1T0sRCkNOF0RrX2hIZ0xrbBhockMcHG 95G2NHTVtoHkJAXUhDa3hFEQpYXBcfBBoEGxgYBxxLSEtPHhwaBRsaBBsaGgQeEgQbEBseGh8aE QpeWRd4QR9jUxEKTVwXGB8SEQpMWhdoaUJNUxEKTU4XaBEKQ1oXHBoEGxMbBBsYGQQfHBEKQl4X GxEKRFgXGBEKRF4XHhEKREkXGREKQkYXZxNtYBtbZUIffn0RCkJcFxoRCkJFF24ZWExeYQFwUkx hEQpCThdkQnxaRURBYh1kUBEKQkwXb35dTRgFXWYaUnsRCkJsF2RhT0tgQkgSeB1nEQpCQBdtGX 5cf09af19eTREKTV4XGxEKWlgXGBEKcGgXZlxvaXsffnpIHWsQGRoRCnBoF2d9WmwZHwVLRVpTE BkaEQpwaBdoeW1IEh9QGWwBXhAZGhEKcGgXZhtCWVhuZkVcBR8QGRoRCnBoF2RoGEhQSx8fb1pI EBkaEQpwbBdtThtvUwFHUkgdcxAZGhEKbX4XGxEKWE0XSxEg X-PDR: PASS X-Source-IP: 60.191.123.56 X-ServerName: smtp.h3c.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:60.191.123.56 ip4:60.191.123.50 ip4:221.12.31.13 ip4:221.12.31.56 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8775 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=0 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=174 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801160174 X-Spam: Clean Cc: ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH] ocfs2: clean dead code up in alloc.c X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8775 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801160174 X-Virus-Scanned: ClamAV using ClamSMTP Some stack variables are no longer used but still assigned. Trim them. Signed-off-by: Changwei Ge Reviewed-by: Jun Piao Reviewed-by: Alex Chen --- fs/ocfs2/alloc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index addd7c5..edef99c 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -2598,11 +2598,8 @@ static void ocfs2_unlink_subtree(handle_t *handle, int i; struct buffer_head *root_bh = left_path->p_node[subtree_index].bh; struct ocfs2_extent_list *root_el = left_path->p_node[subtree_index].el; - struct ocfs2_extent_list *el; struct ocfs2_extent_block *eb; - el = path_leaf_el(left_path); - eb = (struct ocfs2_extent_block *)right_path->p_node[subtree_index + 1].bh->b_data; for(i = 1; i < le16_to_cpu(root_el->l_next_free_rec); i++) @@ -3940,7 +3937,7 @@ static void ocfs2_adjust_rightmost_records(handle_t *handle, struct ocfs2_path *path, struct ocfs2_extent_rec *insert_rec) { - int ret, i, next_free; + int i, next_free; struct buffer_head *bh; struct ocfs2_extent_list *el; struct ocfs2_extent_rec *rec; @@ -3957,7 +3954,6 @@ static void ocfs2_adjust_rightmost_records(handle_t *handle, ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci), "Owner %llu has a bad extent list\n", (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci)); - ret = -EIO; return; } @@ -5059,7 +5055,6 @@ int ocfs2_split_extent(handle_t *handle, struct buffer_head *last_eb_bh = NULL; struct ocfs2_extent_rec *rec = &el->l_recs[split_index]; struct ocfs2_merge_ctxt ctxt; - struct ocfs2_extent_list *rightmost_el; if (le32_to_cpu(rec->e_cpos) > le32_to_cpu(split_rec->e_cpos) || ((le32_to_cpu(rec->e_cpos) + le16_to_cpu(rec->e_leaf_clusters)) < @@ -5095,9 +5090,7 @@ int ocfs2_split_extent(handle_t *handle, } eb = (struct ocfs2_extent_block *) last_eb_bh->b_data; - rightmost_el = &eb->h_list; - } else - rightmost_el = path_root_el(path); + } if (rec->e_cpos == split_rec->e_cpos && rec->e_leaf_clusters == split_rec->e_leaf_clusters)