Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2566781pxb; Tue, 24 Aug 2021 02:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtO/SpzTjBTeuT84YX7ZEztiIarwUVnNCr9UQjlz/0Ant1O1k1RyDPfmN0XvCjLqTKEjKr X-Received: by 2002:a17:906:6ad4:: with SMTP id q20mr41348199ejs.433.1629796051305; Tue, 24 Aug 2021 02:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629796051; cv=none; d=google.com; s=arc-20160816; b=ZLa1Efhkec4sr+AekE2OdsY1oXkQYw1xxpz7nm4IJJdkyXY1BL+C2lQ0epW/XqVdFT ElLReHq+Du+B3oO/OaVR/8qMqdDnIfeqqfkqnvqdDwjOvDLjW434N3JQwj/9cs66QGsP FdM13hywrZajsY705XjS+tYCwgHDfenVjTfKxkwCYmC40HiQd6dLYnw2/4Ogte2ZbdPp HQw9Yoq+DqnEJguBBxzaSGxYi7ljt6V/t9Llx2FaW467qg58yH3z0jX44x9WSNHbpIzW TskpHFlY+cWCL4tCE86seUEXCDuxS2GB0bOT+YiQnK1MgfAKHb+GOKBXCm4RJOGfxFxw Ky5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tww6XVE62J265ghFTkVGXgkg5lbz4z++5Ad3DbvV2v0=; b=uV5kB5uj2npwvIUfwKuSYPIEjaWiy7b3GT/vRUaG1OLYUgg8VqShbamPdLEHwYZZjQ TXmbQUSy7eKpwfa1+bjolI4vTOnNMciWdunUfpKW1fmElBX2hlVeriSaXk+M945eWuZf i481Mxf9t+Po47JrNHusjCDIsuw/txRmbcSBl6BfSIwtOb3Wl7r6CSK8XL3C5PN8HNbx oq3VLBVrikkJVBOg+SX+kaCZuZBTYAx39sfkBZlQpBNghBh4KZFecdB0XLnjMIV/ZST8 eHZzMYOFkbPuspaDKktKjXnOCgZctZxif/Mo/pYFVlCfIwS8t+TvqWKzLzVSvo7UqPQa MAfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="j5rQGC/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si5038687edz.503.2021.08.24.02.07.06; Tue, 24 Aug 2021 02:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="j5rQGC/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235387AbhHXJET (ORCPT + 99 others); Tue, 24 Aug 2021 05:04:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234214AbhHXJES (ORCPT ); Tue, 24 Aug 2021 05:04:18 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C655C061757; Tue, 24 Aug 2021 02:03:34 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id u22so43891288lfq.13; Tue, 24 Aug 2021 02:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tww6XVE62J265ghFTkVGXgkg5lbz4z++5Ad3DbvV2v0=; b=j5rQGC/VUVcFs01zA0bPZ+6T6p53CUNuDWeYLpl/I18ETzkRCMfJanVwuehBYAd/ST 9pTFsE6vXjh6hb2Q/UpvLFiRaVlQ3FYXbaRPPWhi1jm4G2PvCgLxFKWjeA7+hwELZet2 J6psJziUUYzpJq//CVVtEQwWBHGyHqYy3Ibcg+RxmmRkyOv+m1HRljpzEuR0N1bOvxlB RuQE2V5FpaVw30AeTdkHzcrg1BlTn6POuJ0vb1jTWcdbYgYixLupXbOyEsF4tJk+rHCO ZIXFgwfobIOrSDXyveYMI6cuRHdxIoLit91NnSU2lh1GJ1hjM+r0Wd0lqdzEV0cZ/bvZ V1wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tww6XVE62J265ghFTkVGXgkg5lbz4z++5Ad3DbvV2v0=; b=Tix4v+Sksk5Bbp7Bd0ZT8vlj5qMxRc/MjF+UZWdSP1GkRckt7TsAxh03NvV2NqzKzT T16WzdGoJF7F8H8/8QpRKA75+KKY+hiBEDSf90foybp4/4/lI37bfXDanEOw5sbtpUH6 YNebg7RUuQ0W3xkMZHkZASDHlE2hERVUnEP5xbj7Ig7pZrsFiDgXr8TiWqgRUJ9ihlcg yD0WGbzU4KDSoLWgFN39yGFUScKJWJcGKnXVIBfJBQ1XIgJ6lkNNsq9aXCOKfdNzYsne 15HdE6LRGXredUez7WxQC+6n4k4HYhqE2qWpxmyHclnkZkBl6c1mx1D8yoLUDA4VEMbH 5faA== X-Gm-Message-State: AOAM5331AM0tHZ7rQRrsXzLhkVDNMMT6+D9U6qxI1/4tecfK2/lJHyKP uYsAUr8t1xEMviKaur2aEmo= X-Received: by 2002:ac2:4c45:: with SMTP id o5mr2392789lfk.177.1629795812382; Tue, 24 Aug 2021 02:03:32 -0700 (PDT) Received: from kari-VirtualBox (85-23-89-224.bb.dnainternet.fi. [85.23.89.224]) by smtp.gmail.com with ESMTPSA id p1sm733035lfs.10.2021.08.24.02.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 02:03:31 -0700 (PDT) Date: Tue, 24 Aug 2021 12:03:30 +0300 From: Kari Argillander To: Dan Carpenter Cc: Konstantin Komarov , ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/3] fs/ntfs3: Fix error code in indx_add_allocate() Message-ID: <20210824090330.fmuif7e4kku2nrli@kari-VirtualBox> References: <20210824074932.GA13096@kili> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824074932.GA13096@kili> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 10:49:32AM +0300, Dan Carpenter wrote: > Return -EINVAL if ni_find_attr() fails. Don't return success. > > Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") > Signed-off-by: Dan Carpenter Good catch. It seems it is like 50/50 if this should be -ENOENT. I just check what we do else where where !ni_find_attr(). But either way: Reviewed-by: Kari Argillander > --- > fs/ntfs3/index.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c > index 6aa9540ece47..07d6dee0a4ba 100644 > --- a/fs/ntfs3/index.c > +++ b/fs/ntfs3/index.c > @@ -1499,6 +1499,7 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni, > alloc = ni_find_attr(ni, NULL, NULL, ATTR_ALLOC, in->name, in->name_len, > NULL, &mi); > if (!alloc) { > + err = -EINVAL; > if (bmp) > goto out2; > goto out1; > -- > 2.20.1 > >