Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp17596imm; Fri, 21 Sep 2018 09:35:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbCtS5ZGFlTmfCWt9wKtbasVuay/Idhqi+YaGK8Ah5lryOeNSYtAearHl9IwSggF+idW+Ei X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr45902173plg.152.1537547714655; Fri, 21 Sep 2018 09:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537547714; cv=none; d=google.com; s=arc-20160816; b=m5fnwnRNTzmSUiL8dEGULPueL0tSGQe2B2Yw88gyTUaJw6h2CHeynV1yXAJ7drbF0g DuKyXfnJhe2LdcxgPDVs5KhynGp6H+AxFXStAFoEIaHNGHC9t7xBsAqf8Vb6433l/Skq iLT69wtX3KqOHYTrHRHxUD+GDfOmvW3X0b6ToN1jdD69g31P3gDDF5XuPszjdt0+fejx z3RzifmNQXWdoST23xz0IUq5hgxhPZE/W+lgbLBSEnsME4QvkWGTCokE5BPlYgHPGNz0 s63B3RaxlRheHGj+Gn6Q8dRvSgyZgEmnwUExYWggw0N3o854wsDGZJpvYI4SmS74A6Xv HIiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization; bh=9ZA5XAkY2YtpgjbMaeiAC9+CDFMKGvzYrqAUS5bRY1E=; b=gfiwz4vEy/aQ2zWrT2nQMq5hpEZDaov31aFGqbDyeIYX1EqjZiypOCZ9aJ4c9E05o3 6SMUEjcF+CgnGMbIm1MVDC2CZuSlp+dNIEKjfAtXgsC2juuauK7LNMepeSLR9w3JblHE Uxve/BNE5pHiU7OE9af08Ra77PSHAaM6UD0BH01csyMeQStzUmziZ+boZBWxYnuvl8yH AhnAX/ZmcBdj7ZEwsWetMSzkZWblu9iEFdxPTTsWvxWR1Rc6b8S5YPPMfVmu/ZXnbpkn /j7VMtPJSSi4nHHpSZgXkCAePgZ1Wz4iH1ShJ7C1gRkb310Z5h2hqhzQdLAlIzA349uk DIfg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15-v6si27308675pgi.62.2018.09.21.09.34.59; Fri, 21 Sep 2018 09:35:14 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391129AbeIUWXi (ORCPT + 99 others); Fri, 21 Sep 2018 18:23:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49424 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728313AbeIUWXh (ORCPT ); Fri, 21 Sep 2018 18:23:37 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CB0C804E5; Fri, 21 Sep 2018 16:33:59 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACCEB308BE75; Fri, 21 Sep 2018 16:33:57 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 28/34] vfs: Add some logging to the core users of the fs_context log [ver #12] From: David Howells To: viro@zeniv.linux.org.uk Cc: torvalds@linux-foundation.org, dhowells@redhat.com, ebiederm@xmission.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mszeredi@redhat.com Date: Fri, 21 Sep 2018 17:33:56 +0100 Message-ID: <153754763694.17872.12476648577324287426.stgit@warthog.procyon.org.uk> In-Reply-To: <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> References: <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 21 Sep 2018 16:33:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add some logging to the core users of the fs_context log so that information can be extracted from them as to the reason for failure. Signed-off-by: David Howells --- fs/super.c | 4 +++- kernel/cgroup/cgroup-v1.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/super.c b/fs/super.c index de43b140bbb1..021cbdcc0e6e 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1771,8 +1771,10 @@ int vfs_get_tree(struct fs_context *fc) struct super_block *sb; int ret; - if (fc->fs_type->fs_flags & FS_REQUIRES_DEV && !fc->source) + if (fc->fs_type->fs_flags & FS_REQUIRES_DEV && !fc->source) { + errorf(fc, "Filesystem requires source device"); return -ENOENT; + } if (fc->root) return -EBUSY; diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index d8b325c3c2eb..d5ae888b8c57 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c @@ -17,7 +17,7 @@ #include -#define cg_invalf(fc, fmt, ...) ({ pr_err(fmt, ## __VA_ARGS__); -EINVAL; }) +#define cg_invalf(fc, fmt, ...) invalf(fc, fmt, ## __VA_ARGS__) /* * pidlists linger the following amount before being destroyed. The goal