]> www.infradead.org Git - users/willy/linux.git/commitdiff
vfs: Add some logging to the core users of the fs_context log
authorDavid Howells <dhowells@redhat.com>
Fri, 7 Sep 2018 06:41:01 +0000 (07:41 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 23 Oct 2018 16:39:01 +0000 (17:39 +0100)
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 <dhowells@redhat.com>
fs/super.c
kernel/cgroup/cgroup-v1.c

index 4a01ec1dad29d037b95700a96cc4247e7fe7b38b..d988c39d7fed6dcc58b0236f253587daae763780 100644 (file)
@@ -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;
index d8b325c3c2ebccfe93662d1d1c1cb42a1810b890..d5ae888b8c57f21f89372d6be56821d21f28f3df 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <trace/events/cgroup.h>
 
-#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