Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6912749rwd; Tue, 6 Jun 2023 03:57:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6HkpAMugMNSAX2VAJqOWGm7L0SXodau0U27wLAdYgSBhjdXno3FlJv8xssP4ADIekMOqs6 X-Received: by 2002:a05:620a:84c7:b0:75d:53eb:8c0e with SMTP id pq7-20020a05620a84c700b0075d53eb8c0emr1540829qkn.26.1686049076881; Tue, 06 Jun 2023 03:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686049076; cv=none; d=google.com; s=arc-20160816; b=07rZGagO1MTxyWVBpXue1nHzsu7+2ElvBJzt4bQZozAfT4rRGpr9iWAdaE6TT8vixB naDw7saoSDqFKM6r7lcWF3bpz4efjray8J8w7Jgj+xXd/I8AKKzsCgRPNC1HJQ3Ut4Of hMzPaul/oa0BQ4N6dRefrLa/Nd/hituF3qbdFJvepGNQyPjImcDsL4PGuMR3GDJ1FK7M bx3noJTcEMeLruazqb7tXaP75bbUobz2pi+nYS8LC3+nlVcWtk2V0CHihnp1ZuoHc4M+ sqAw2ZzS7R995T6DqqecgWFVIda+KM+8uaOpiuym48JpXKaRynZeXRAad9VCRWzCx7GI 1qcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qd8uKMFm81vYRFqw2LDxc+4LQWMvwJ/7wVX2rL8bDEE=; b=UBB6WMVp04945gisMvcyPMyS3raxg/NeT1V9K1CaDKvYwtVgXeyukahbvU4TADXLgz GGa65UTQshjBRJX7jc66jCi9BVKLvnxlhNzsL91Z9LeF9xWsWTTRsHcEPNDh/O2vZLQV XCsMnHr0rbclxaxSFkfuouEjR7eg8UNFe9sluuqpaE+jnIo3y7qjWOfpr+v++Ljmy47S KGVm9wHvXp0evxgTGVgExQkyQ79IopujplGSmyNuxlNWu58Kls/xbjsG+tKsMysudENJ 8YdDxgNgCNtbIoy+/fiBZUnFW6yz6/9iNQV9MjFNtycODYTdd8mbZ9ccLla0gkPoUi+o OXSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=FLE32HTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u22-20020ae9c016000000b007592943ab11si5843405qkk.98.2023.06.06.03.57.42; Tue, 06 Jun 2023 03:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=FLE32HTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237304AbjFFKh7 (ORCPT + 99 others); Tue, 6 Jun 2023 06:37:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236775AbjFFKhO (ORCPT ); Tue, 6 Jun 2023 06:37:14 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E761710F0 for ; Tue, 6 Jun 2023 03:36:26 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-51480d3e161so8598706a12.3 for ; Tue, 06 Jun 2023 03:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1686047785; x=1688639785; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qd8uKMFm81vYRFqw2LDxc+4LQWMvwJ/7wVX2rL8bDEE=; b=FLE32HTMQXTPXIMgRym716RCPA5ZfaA426svAlixR6NT+JFwFi3wq9dhD5MTfGgcdS ydtKJDvXeYGZsCfd+Tpk4F1Ps9V0Sum8jeyo/vtelPtEMQ7X+FOslAzStxiS/F1qBha6 7lhn3d9cM9dPtUfsVDGrEjsK1NUJDrPtoRc7k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686047785; x=1688639785; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qd8uKMFm81vYRFqw2LDxc+4LQWMvwJ/7wVX2rL8bDEE=; b=ZgAayKYePBpQyHhd+JwywVpCnnI2mtDla09G6gp6MeKuH6sxjdrtwzZJzCOHHs2HSw Pn0mKkTJPRGX5J8RaIrZbKEzEGDGU7Fg3XgjYk4pdFCdaeyIQukulrlQ9E6aECLD79F3 BqwtaGjNtpcN/jrBU42aKzrbZ5vtlNuk3SQHZUJnpPYfiX42FX8GC4kipBHXJ7j8vKew l+Rf1O7zwLJmuG2zlojHMGpIkbCRRo08EVSEpGelLZbrwz+4xjNeKJfcZKsugyoHD7Ic yjuijitPi5rAF4nYc6liZgYveOa2QBuHneY630wCYPyDyIqOXVYhQ+3WByli5YN8kgqU uFmQ== X-Gm-Message-State: AC+VfDx4mnGKHz8Q+nq2sDo+TGSh2vp5RLoWOZN6WH8APJ2Mh2cpUVYO 7LZc7rcxxS2Yhy1ZyIeIjBq2EXImClHxApuaIidzqA== X-Received: by 2002:a17:907:2d13:b0:974:1e0e:9bd2 with SMTP id gs19-20020a1709072d1300b009741e0e9bd2mr2417597ejc.14.1686047785487; Tue, 06 Jun 2023 03:36:25 -0700 (PDT) MIME-Version: 1.0 References: <20230506150911.1983249-1-gwj1235@yeah.net> In-Reply-To: <20230506150911.1983249-1-gwj1235@yeah.net> From: Miklos Szeredi Date: Tue, 6 Jun 2023 12:36:14 +0200 Message-ID: Subject: Re: [PATCH v2] overlayfs: clean error handling To: wenjun93 Cc: linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, wenjun93 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 6 May 2023 at 17:09, wenjun93 wrote: > > Remove PTR_ERR from unused code path and > assign error value where it exactly happens. > This cleans the code and also helps to reduce > the possibility of incorrect err settings > when it's set globally and is forgotten to be > overwrite in custom development. > > Signed-off-by: wenjun93 Nack. This is a regularly used pattern across the kernel to unclutter error handling. If you find a concrete bug, please submit a fix for that. Thanks, Miklos