Received: by 2002:ac2:48a3:0:0:0:0:0 with SMTP id u3csp571376lfg; Fri, 11 Mar 2022 13:40:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXI+MNFJEO6ejPxn4oSJoYSOI7XbY8LbSrSA+7v2tseMON1ZmNJbh+41sehPKHlstsJTrT X-Received: by 2002:a17:902:ea05:b0:153:4020:d64d with SMTP id s5-20020a170902ea0500b001534020d64dmr2996178plg.163.1647034823671; Fri, 11 Mar 2022 13:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647034823; cv=none; d=google.com; s=arc-20160816; b=xZBp4VSDtPkIjIsIPGENmYH3chaYa5qv76+ouSEoUk6wLGjQq0w0RO6yZZzR2WEjZY AX/rtSvARONiFQJZ77BsxcUnYKLEadkvZmwcu+Zp1dfqEjaoo0/8177H2rTyFg+SBkcX xobCuMsCv7UgW+qkJ1H7+hU1qp0E8U1PbK9g+Uz0Yt5u+zh11BsoQp2NzLqJhr9TlJV7 fhLIbjbFyjhGyASlAPeFjLw3xgNcEzqXW3UD/U2Gc/2byFqzWyU++UJ6VnpnbQKKLYoG yxAlYxz86qUBJBobjk3yegavll7HWWejhyOG9LgasOiuAiAFNhv7+wshsqKaHDX0wP7d VWqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=F9oTQJj/bOWo+DnmjeL79H/5Dvz3gPQThlOlCq8LXyg=; b=BVrzKXxaTCJsEEmu3zU3WeQaJHBqmAj+JpQ3IYVsuTkE3YuJ/1cjDFA+rXlU54DlNb EY2Ea/EjuufmBRZodhnHn1EeJqrUzCCKTWbWe4EVM1JExyEn7Ku8ga9gtt1wz5W9n+Y6 T8/p2Dd0hKZ/cJUHYtZF3pcd6wtrxKMDLptdYQEti7sDbjUrSQ2RgaM/O1uN77LP3O1S kPXuBFRpsm3uCo7CZHqqqaA31LE9uruYptYXbg6H8OzgzEndSIQF/erQWKETmbGCQYaq BWZCNMmJyPfegyxLfb8lSwyKr3H29whTAn+RBRs0HDHimx6HhgLOYAZMBnfES1KMSXAE yFcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=BtQJETfV; dkim=pass header.i=@codewreck.org header.s=2 header.b=BtQJETfV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i12-20020a17090a974c00b001bd14e03063si5962687pjw.59.2022.03.11.13.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 13:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=BtQJETfV; dkim=pass header.i=@codewreck.org header.s=2 header.b=BtQJETfV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4FC221F9838; Fri, 11 Mar 2022 13:07:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231492AbiCKOOK (ORCPT + 99 others); Fri, 11 Mar 2022 09:14:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349871AbiCKONi (ORCPT ); Fri, 11 Mar 2022 09:13:38 -0500 Received: from nautica.notk.org (ipv6.notk.org [IPv6:2001:41d0:1:7a93::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 826C21C65CF for ; Fri, 11 Mar 2022 06:12:22 -0800 (PST) Received: by nautica.notk.org (Postfix, from userid 108) id 929C7C01B; Fri, 11 Mar 2022 15:12:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1647007940; bh=F9oTQJj/bOWo+DnmjeL79H/5Dvz3gPQThlOlCq8LXyg=; h=From:To:Cc:Subject:Date:From; b=BtQJETfV7ckRZaHu3+Pz0LoOZinNNMnVWZNnSWyvGsJOPkmUGMMfpxr2YRym04l9E zQS5scHlHFAHZhhdNA9K54ROQbUv6U3vI+Cdw8YMFACYaqY3Ijg9epNzip/8v2xASv smMWT4STe0H6bEhP/xAlTIb7XHv4H54IZosVXfhUBYL4nQkSeUOAbxj7Rt0n9tAg1T iRLKSjvoo8ItbWshS2vrqO90w1qBDZSRgTxXqJQ3/lp/lGGA17dB8Xk1SwHSCSt7cc Ft5Ij6xqk+OuMfxemEIFQWYnFgXYAHksYwPQ0HLi/uctAYuKKicksNUK0oxlXrEjI9 lIH+9PzldQPQw== X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Received: from odin.codewreck.org (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id 046C5C009; Fri, 11 Mar 2022 15:12:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1647007940; bh=F9oTQJj/bOWo+DnmjeL79H/5Dvz3gPQThlOlCq8LXyg=; h=From:To:Cc:Subject:Date:From; b=BtQJETfV7ckRZaHu3+Pz0LoOZinNNMnVWZNnSWyvGsJOPkmUGMMfpxr2YRym04l9E zQS5scHlHFAHZhhdNA9K54ROQbUv6U3vI+Cdw8YMFACYaqY3Ijg9epNzip/8v2xASv smMWT4STe0H6bEhP/xAlTIb7XHv4H54IZosVXfhUBYL4nQkSeUOAbxj7Rt0n9tAg1T iRLKSjvoo8ItbWshS2vrqO90w1qBDZSRgTxXqJQ3/lp/lGGA17dB8Xk1SwHSCSt7cc Ft5Ij6xqk+OuMfxemEIFQWYnFgXYAHksYwPQ0HLi/uctAYuKKicksNUK0oxlXrEjI9 lIH+9PzldQPQw== Received: from localhost (odin.codewreck.org [local]) by odin.codewreck.org (OpenSMTPD) with ESMTPA id 4c2ced64; Fri, 11 Mar 2022 14:12:15 +0000 (UTC) From: Dominique Martinet To: David Howells Cc: linux-cachefs@redhat.com, linux-kernel@vger.kernel.org, Dominique Martinet Subject: [PATCH] fscache_aquire_cache: error instead of asserting name is set Date: Fri, 11 Mar 2022 23:12:08 +0900 Message-Id: <20220311141208.847320-1-asmadeus@codewreck.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org name comes straight from the cachefilesd config file, so return an error that the daemon handles and reports instead of printing a kernel stack in dmesg Signed-off-by: Dominique Martinet --- fs/fscache/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/fscache/cache.c b/fs/fscache/cache.c index 2749933852a9..6115b974585d 100644 --- a/fs/fscache/cache.c +++ b/fs/fscache/cache.c @@ -150,7 +150,9 @@ struct fscache_cache *fscache_acquire_cache(const char *name) { struct fscache_cache *cache; - ASSERT(name); + if (!name) + return ERR_PTR(-EINVAL); + cache = fscache_lookup_cache(name, true); if (IS_ERR(cache)) return cache; -- 2.35.1