]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
vfs: Add some logging to the core users of the fs_context log
authorDavid Howells <dhowells@redhat.com>
Thu, 1 Nov 2018 23:07:26 +0000 (23:07 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 28 Feb 2019 08:29:38 +0000 (03:29 -0500)
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/super.c
kernel/cgroup/cgroup-v1.c

index 0ebb5c11fa568841e450311fd6fcca742ddda885..583a0124bc394d2919b2fbc346948c5ab9684201 100644 (file)
@@ -1467,8 +1467,10 @@ int vfs_get_tree(struct fs_context *fc)
        struct super_block *sb;
        int error;
 
-       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 571ef3447426562fc091ccb2f376eae0cde2ffdc..c126b34fd4ff583af524f52bf973b9734acf9b9e 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