diff options
author | Ian Kent <ikent@redhat.com> | 2016-03-15 17:58:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-15 19:55:16 -0400 |
commit | cab49f9ed880be69fd8f6a3419347a368ff0ec32 (patch) | |
tree | 21cb0b15f88d917eead0e0cd845d9558ad5cd5a2 /fs | |
parent | 0266725ad4ee0f8fcf2ee73be8e68c4adbf2ac79 (diff) |
autofs4: make autofs log prints consistent
Use the pr_*() print in AUTOFS_*() macros instead of printks and include
the module name in log message macros. Also use the AUTOFS_*() macros
everywhere instead of raw printks.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/autofs4/autofs_i.h | 6 | ||||
-rw-r--r-- | fs/autofs4/dev-ioctl.c | 2 | ||||
-rw-r--r-- | fs/autofs4/inode.c | 12 | ||||
-rw-r--r-- | fs/autofs4/waitq.c | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index e50cfae487b2..ba6d4ebc2f82 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h | |||
@@ -36,15 +36,15 @@ | |||
36 | /* #define DEBUG */ | 36 | /* #define DEBUG */ |
37 | 37 | ||
38 | #define DPRINTK(fmt, ...) \ | 38 | #define DPRINTK(fmt, ...) \ |
39 | pr_debug("pid %d: %s: " fmt "\n", \ | 39 | pr_debug(KBUILD_MODNAME ":pid:%d:%s: " fmt "\n",\ |
40 | current->pid, __func__, ##__VA_ARGS__) | 40 | current->pid, __func__, ##__VA_ARGS__) |
41 | 41 | ||
42 | #define AUTOFS_WARN(fmt, ...) \ | 42 | #define AUTOFS_WARN(fmt, ...) \ |
43 | printk(KERN_WARNING "pid %d: %s: " fmt "\n", \ | 43 | pr_warn(KBUILD_MODNAME ":pid:%d:%s: " fmt "\n", \ |
44 | current->pid, __func__, ##__VA_ARGS__) | 44 | current->pid, __func__, ##__VA_ARGS__) |
45 | 45 | ||
46 | #define AUTOFS_ERROR(fmt, ...) \ | 46 | #define AUTOFS_ERROR(fmt, ...) \ |
47 | printk(KERN_ERR "pid %d: %s: " fmt "\n", \ | 47 | pr_err(KBUILD_MODNAME ":pid:%d:%s: " fmt "\n", \ |
48 | current->pid, __func__, ##__VA_ARGS__) | 48 | current->pid, __func__, ##__VA_ARGS__) |
49 | 49 | ||
50 | /* | 50 | /* |
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index b8d0329ba775..1299e7a90afd 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -373,7 +373,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp, | |||
373 | new_pid = get_task_pid(current, PIDTYPE_PGID); | 373 | new_pid = get_task_pid(current, PIDTYPE_PGID); |
374 | 374 | ||
375 | if (ns_of_pid(new_pid) != ns_of_pid(sbi->oz_pgrp)) { | 375 | if (ns_of_pid(new_pid) != ns_of_pid(sbi->oz_pgrp)) { |
376 | AUTOFS_WARN("Not allowed to change PID namespace"); | 376 | AUTOFS_WARN("not allowed to change PID namespace"); |
377 | err = -EINVAL; | 377 | err = -EINVAL; |
378 | goto out; | 378 | goto out; |
379 | } | 379 | } |
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index 7872830d3de9..df06c9afbd33 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c | |||
@@ -270,14 +270,14 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
270 | if (parse_options(data, &pipefd, &root_inode->i_uid, &root_inode->i_gid, | 270 | if (parse_options(data, &pipefd, &root_inode->i_uid, &root_inode->i_gid, |
271 | &pgrp, &pgrp_set, &sbi->type, &sbi->min_proto, | 271 | &pgrp, &pgrp_set, &sbi->type, &sbi->min_proto, |
272 | &sbi->max_proto)) { | 272 | &sbi->max_proto)) { |
273 | printk("autofs: called with bogus options\n"); | 273 | AUTOFS_ERROR("called with bogus options"); |
274 | goto fail_dput; | 274 | goto fail_dput; |
275 | } | 275 | } |
276 | 276 | ||
277 | if (pgrp_set) { | 277 | if (pgrp_set) { |
278 | sbi->oz_pgrp = find_get_pid(pgrp); | 278 | sbi->oz_pgrp = find_get_pid(pgrp); |
279 | if (!sbi->oz_pgrp) { | 279 | if (!sbi->oz_pgrp) { |
280 | pr_warn("autofs: could not find process group %d\n", | 280 | AUTOFS_ERROR("could not find process group %d", |
281 | pgrp); | 281 | pgrp); |
282 | goto fail_dput; | 282 | goto fail_dput; |
283 | } | 283 | } |
@@ -294,8 +294,8 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
294 | /* Couldn't this be tested earlier? */ | 294 | /* Couldn't this be tested earlier? */ |
295 | if (sbi->max_proto < AUTOFS_MIN_PROTO_VERSION || | 295 | if (sbi->max_proto < AUTOFS_MIN_PROTO_VERSION || |
296 | sbi->min_proto > AUTOFS_MAX_PROTO_VERSION) { | 296 | sbi->min_proto > AUTOFS_MAX_PROTO_VERSION) { |
297 | printk("autofs: kernel does not match daemon version " | 297 | AUTOFS_ERROR("kernel does not match daemon version " |
298 | "daemon (%d, %d) kernel (%d, %d)\n", | 298 | "daemon (%d, %d) kernel (%d, %d)", |
299 | sbi->min_proto, sbi->max_proto, | 299 | sbi->min_proto, sbi->max_proto, |
300 | AUTOFS_MIN_PROTO_VERSION, AUTOFS_MAX_PROTO_VERSION); | 300 | AUTOFS_MIN_PROTO_VERSION, AUTOFS_MAX_PROTO_VERSION); |
301 | goto fail_dput; | 301 | goto fail_dput; |
@@ -312,7 +312,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
312 | pipe = fget(pipefd); | 312 | pipe = fget(pipefd); |
313 | 313 | ||
314 | if (!pipe) { | 314 | if (!pipe) { |
315 | printk("autofs: could not open pipe file descriptor\n"); | 315 | AUTOFS_ERROR("could not open pipe file descriptor"); |
316 | goto fail_dput; | 316 | goto fail_dput; |
317 | } | 317 | } |
318 | ret = autofs_prepare_pipe(pipe); | 318 | ret = autofs_prepare_pipe(pipe); |
@@ -332,7 +332,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
332 | * Failure ... clean up. | 332 | * Failure ... clean up. |
333 | */ | 333 | */ |
334 | fail_fput: | 334 | fail_fput: |
335 | printk("autofs: pipe file descriptor does not contain proper ops\n"); | 335 | AUTOFS_ERROR("pipe file descriptor does not contain proper ops"); |
336 | fput(pipe); | 336 | fput(pipe); |
337 | /* fall through */ | 337 | /* fall through */ |
338 | fail_dput: | 338 | fail_dput: |
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index a8a94621d813..314230d12cfa 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -164,7 +164,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, | |||
164 | break; | 164 | break; |
165 | } | 165 | } |
166 | default: | 166 | default: |
167 | printk("autofs4_notify_daemon: bad type %d!\n", type); | 167 | AUTOFS_WARN("bad type %d!", type); |
168 | mutex_unlock(&sbi->wq_mutex); | 168 | mutex_unlock(&sbi->wq_mutex); |
169 | return; | 169 | return; |
170 | } | 170 | } |
@@ -453,7 +453,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, | |||
453 | autofs_ptype_expire_indirect; | 453 | autofs_ptype_expire_indirect; |
454 | } | 454 | } |
455 | 455 | ||
456 | DPRINTK("new wait id = 0x%08lx, name = %.*s, nfy=%d\n", | 456 | DPRINTK("new wait id = 0x%08lx, name = %.*s, nfy=%d", |
457 | (unsigned long) wq->wait_queue_token, wq->name.len, | 457 | (unsigned long) wq->wait_queue_token, wq->name.len, |
458 | wq->name.name, notify); | 458 | wq->name.name, notify); |
459 | 459 | ||