Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7302566imu; Thu, 31 Jan 2019 08:10:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN6lt8NtotvueCAJmbHGbZFljOIWYFWltaqm7lWat6UwjJCw1+3EAPGWqeQaKcKzqLmIlYOE X-Received: by 2002:a17:902:9a98:: with SMTP id w24mr35418291plp.213.1548951038605; Thu, 31 Jan 2019 08:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548951038; cv=none; d=google.com; s=arc-20160816; b=KuQnH9PJYAg5lf+yf1B113AbO+y/eZUufyZdbIoYKR6P5o9tDaLxVWX+kScCzmQDk6 uNvxSJxU4i7Fkn2wRkckgwY63JhRebRysFpBDYpGqAyOZ8SquKT5kxajo/JA9JKBod2N UkiJgD4AgnNYgd6wLzKB7RxjMDm8UDbLEBQ21CHwHhpqS6FstCtHUCQ5BWIxXfryBvl6 2oYwpkmmo9c1OvDLq/mwMjZoa6NP4kGFPQDCmF6bgOG957fJPc3f9BoN5vtskHPUVJkp 6uMcmEbvTr45os11Hku8fWK+r29qb39gIHtih6QKWmPw4Xm/zgCT5A/0AT6Zd6l0lLZL ZhHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UZDhNb4sVXnlVoRkQvj1z4u9Zv5cFgKlz/b2lxRaoPI=; b=BjFgptg5JrRT6k005wLMxkJ8iK8wKi5BvwWoEXFaN+H3wqAFlY+yY0VX5rVkxTLexV lcgvsLq4w7Ha1DlDTp3rDnftsIXoC4682FCqU1tHvyWWd6g+PCJlDZuubisYgOkicj+i aFK1UIZv2T9gh7Pmte25ZnDx2QWxbU/a7ep2uONC1RpPdYVcD/Rr3a3rKwVfgCj+jV6U ykMzqFv8ZnTi92RPJcFbt326iWjs3Amma39CP/nvZTSMGDNYum1qhHgN3oR2Z+W+VP5j z8GSrILp+/6Qm/dg7xFYanZdV7cxaBnWgPhXnBhrpyhLhlm43mb0r4oFNJ8UidqS8ivk R7Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=J3oCes5O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r39si1474791pld.434.2019.01.31.08.10.21; Thu, 31 Jan 2019 08:10:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=J3oCes5O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388029AbfAaQJr (ORCPT + 99 others); Thu, 31 Jan 2019 11:09:47 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:38294 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727189AbfAaQJr (ORCPT ); Thu, 31 Jan 2019 11:09:47 -0500 Received: by mail-it1-f194.google.com with SMTP id z20so4974769itc.3 for ; Thu, 31 Jan 2019 08:09:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UZDhNb4sVXnlVoRkQvj1z4u9Zv5cFgKlz/b2lxRaoPI=; b=J3oCes5OPHB+6WC7iK+6Bv/vJAn/0GRY3kTFJiC1znYpGLb6xldzpM/uW2qPALEQpZ Q6DAGAc/VWFUsGjie0B6CnvC3WdDL5Wx5yBNoAFH9G/xbGnTRudXOXlW7bwsV9BsStCz y63OK+00cx80Mef8GgK7mmbwNllr75Gh/wnfo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UZDhNb4sVXnlVoRkQvj1z4u9Zv5cFgKlz/b2lxRaoPI=; b=ZW/cgz6J2RZ/AAgkd0HrbhC2oI4aGw0AVRaxBlZiundfkZ8XBImIn9YVUgi3PbgzBk /syLvuNS5trk4pir9QeZxFk3O+FDSiGH6gA/C9mIf1RTbphSsqexWnpS6RWuPTM6pfJY ZkZZjG1XkpVxvWDkClOUmT4lrZdxuHFI2Jvww2aNv5HCSJdRJ0b5dR7UnDfyfyCgBDVG Oq2E+X65h/7hmS5dAKLk/d+5U3xPIk3kGdvjs6v49DRdw7wLfavgNSKWYLu4Axj/Fvev 74mcZto3d5S4XZFpx1V7bc4J84BWAII7N/+tyJ7FJ0+rAgSgPnqRC2LNOAL8Ef6Pfol9 VygQ== X-Gm-Message-State: AJcUuke3w+1hc+u7hSE7uLJML2eFNF2jJiSGJgsCkINrbOuKRr4qJUdb OnSYgzxoRLhOMFf7qdRaf2uJQ+Z9iwQrPUJCgXwfMw== X-Received: by 2002:a24:9dce:: with SMTP id f197mr19131102itd.13.1548950986086; Thu, 31 Jan 2019 08:09:46 -0800 (PST) MIME-Version: 1.0 References: <20190122152151.16139-9-gregkh@linuxfoundation.org> <20190129203325.GA2723@kroah.com> In-Reply-To: <20190129203325.GA2723@kroah.com> From: Dan Streetman Date: Thu, 31 Jan 2019 11:09:09 -0500 Message-ID: Subject: Re: [PATCH] zswap: ignore debugfs_create_dir() return value To: Greg Kroah-Hartman Cc: linux-kernel , Seth Jennings , Linux-MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 3:33 PM Greg Kroah-Hartman wrote: > > On Tue, Jan 29, 2019 at 02:46:30PM -0500, Dan Streetman wrote: > > On Tue, Jan 22, 2019 at 10:23 AM Greg Kroah-Hartman > > wrote: > > > > > > When calling debugfs functions, there is no need to ever check the > > > return value. The function can work or not, but the code logic should > > > never do something different based on this. > > > > > > Cc: Seth Jennings > > > Cc: Dan Streetman > > > Cc: linux-mm@kvack.org > > > Signed-off-by: Greg Kroah-Hartman > > > --- > > > mm/zswap.c | 2 -- > > > 1 file changed, 2 deletions(-) > > > > > > diff --git a/mm/zswap.c b/mm/zswap.c > > > index a4e4d36ec085..f583d08f6e24 100644 > > > --- a/mm/zswap.c > > > +++ b/mm/zswap.c > > > @@ -1262,8 +1262,6 @@ static int __init zswap_debugfs_init(void) > > > return -ENODEV; > > > > > > zswap_debugfs_root = debugfs_create_dir("zswap", NULL); > > > - if (!zswap_debugfs_root) > > > - return -ENOMEM; > > > > > > debugfs_create_u64("pool_limit_hit", 0444, > > > zswap_debugfs_root, &zswap_pool_limit_hit); > > > > wait, so if i'm reading the code right, in the case where > > debugfs_create_dir() returns NULL, that will then be passed along to > > debugfs_create_u64() as its parent directory - and the debugfs nodes > > will then get created in the root debugfs directory. That's not what > > we want to happen... > > True, but that is such a rare thing to ever happen (hint, you have to be > out of memory), that it's not really a bad thing. But, you are not the > first to mention this, which is why this patch is on its way to Linus > for 5.0-final: > https://lore.kernel.org/lkml/20190123102814.GB17123@kroah.com/ Ah! Great, in that case then definitely Acked-by: Dan Streetman > > thanks, > > greg k-h