Skip to content

Commit 06a2ae5

Browse files
dhowellsAl Viro
authored andcommitted
vfs: Add some logging to the core users of the fs_context log
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>
1 parent e7582e1 commit 06a2ae5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fs/super.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,8 +1467,10 @@ int vfs_get_tree(struct fs_context *fc)
14671467
struct super_block *sb;
14681468
int error;
14691469

1470-
if (fc->fs_type->fs_flags & FS_REQUIRES_DEV && !fc->source)
1470+
if (fc->fs_type->fs_flags & FS_REQUIRES_DEV && !fc->source) {
1471+
errorf(fc, "Filesystem requires source device");
14711472
return -ENOENT;
1473+
}
14721474

14731475
if (fc->root)
14741476
return -EBUSY;

kernel/cgroup/cgroup-v1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include <trace/events/cgroup.h>
1919

20-
#define cg_invalf(fc, fmt, ...) ({ pr_err(fmt, ## __VA_ARGS__); -EINVAL; })
20+
#define cg_invalf(fc, fmt, ...) invalf(fc, fmt, ## __VA_ARGS__)
2121

2222
/*
2323
* pidlists linger the following amount before being destroyed. The goal

0 commit comments

Comments
 (0)