Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp114286rdb; Tue, 16 Jan 2024 17:23:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbanlxHna/DI7bQ/b9Yr1iNHGDXLsiHuu3yDKnTqFjJZsmgIJhegK3W6Q8ySybXGCOJbYR X-Received: by 2002:a05:620a:4551:b0:783:668:a7b9 with SMTP id u17-20020a05620a455100b007830668a7b9mr10984910qkp.85.1705454626303; Tue, 16 Jan 2024 17:23:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705454626; cv=pass; d=google.com; s=arc-20160816; b=gLu2Jkcz6gMZB0JaY+2PMcqrrJR3aEaq0gC6hY9tViMdDW/c2BZBtv/zY/iy6+GmLV nCBB262yQQQwk3V6TaYu8ADUOGP/uHqzJbfLfcc1aBzx5zK6pyjBCySbct5mEKFxtLU0 ncEC0AwIpubCX6jeQ3CingX7cq6ULY61Tma1Cp72h+CfRVjJVbIuwBsO8jjrMrG30IcJ uspwfAm89o8tBISoH2a7+1pqPQHPuP+vWjhceSsGkF/snUr+ijqEloYl6rIL439vAXVq RO9xMP4UYvj+ow7hLgm4QpqSJJz9iR6o5pfbXKEod4nOLzzICoeEWLq5NCKdfd8I65eS MM1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:cc:to:content-language :subject:user-agent:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:date:message-id; bh=KRBhZ4lp3A11aTzjw+UHtE052Jy4cTLWQzCXZKBumwA=; fh=V+AlqcoW+23sqZz7R3UqwjXOKa8chR3p3YlS8lC5Kyc=; b=bNssmZaSSq8P4Lxd3zGGcwvm+M4LpKNQZysS2H+JQh+4YOYrwvU2gne92FsrGT4j0f 560BD4cOBHbIioaPSXy7g1HxUgugzAlzVQNQ3px/anLDUoEZgb5U4IEy+aMmR89bUgu1 k3IDsROpwr8QRxdVtObyOL/OhPEa40H0ggKFVZv9IldtuFs6+cHPXNzJ99PgdEUhB53F E5V/pnMhn8jhkr+BWGMx8Cg+IkVO3LbwerZZV3dUEio0ZBaI3O0SoMCjNBfdZID3VGS3 8D7wbJkJn7QZO1pDPkP2PiDQX90tz2SmDM4QM3Lc0BD7r7a3s8SkFsC1pe2wMa0zMMu0 rArA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-28423-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28423-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b23-20020a05620a119700b0078166015f7bsi10868005qkk.34.2024.01.16.17.23.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 17:23:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28423-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-28423-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28423-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1335E1C24F11 for ; Wed, 17 Jan 2024 01:23:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1342929A9; Wed, 17 Jan 2024 01:23:37 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id A2B4217D9; Wed, 17 Jan 2024 01:23:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705454616; cv=none; b=iWrXhCoayIaelFngiU8wFdOcLh3hOjF5aPjCqz0lzES6aCCSsrK7dyCsPsDQQXVHMmupeVKrIbKxr6w/t4KtGtLz6+iuTqwW0P/H7I6Rgg433lBpZu6ReyU8jGROoX8FwWIbDjvz+PO+PxPgun3Ma97i3eThBrs6FGimt+GcqvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705454616; c=relaxed/simple; bh=Vmx397rnKN9dTE4JxoTDlJ1QfqShVG2owgUaAVsdmhs=; h=Received:Message-ID:Date:MIME-Version:User-Agent:Subject: Content-Language:To:Cc:X-MD-Sfrom:X-MD-SrcIP:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; b=E+Nl+GpLjT71YvWgKbeEXu4PFAoKbAz6MDbKPsqph1485hzr59421/soKx38Jpg3mJ3VEjqo2/+p4piJbLF3KzFXBfcHwQpMZfF4Pr3nXZGS22u3K9C9kQtavP8Dx0g6yZVLb9f8acCV2VrB48Ga1u3BBnHQo07/7R+I4D1hjWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from [172.30.11.106] (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id CA73D607F2347; Wed, 17 Jan 2024 09:23:02 +0800 (CST) Message-ID: <1847a959-b8a1-29e9-c87e-036709586d1a@nfschina.com> Date: Wed, 17 Jan 2024 09:23:01 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] ocfs2: remove useless code in ocfs2_try_to_merge_extent Content-Language: en-US To: Andrew Morton Cc: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui In-Reply-To: <20240116120926.3bfa87253bf5af5090bd78bd@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/1/17 04:09, Andrew Morton wrote: > On Fri, 12 Jan 2024 12:26:40 +0800 Su Hui wrote: > >> Clang static checker warning: Value stored to 'rec' is never read. >> Remove this useless code to silent this warning. >> >> --- a/fs/ocfs2/alloc.c >> +++ b/fs/ocfs2/alloc.c >> @@ -3743,8 +3743,6 @@ static int ocfs2_try_to_merge_extent(handle_t *handle, >> goto out; >> } >> >> - rec = &el->l_recs[split_index]; >> - >> /* >> * Note that we don't pass split_rec here on purpose - >> * we've merged it into the rec already. > Then: > > ret = ocfs2_merge_rec_left(path, handle, et, rec, > dealloc, split_index); > > and ocfs2_merge_rec_left() almost immediately dereferences `rec'. > > So this looks quite wrong to me. > Oh, really sorry for the noise. This patch is wrong. Su Hui