diff options
| author | Fabian Frederick <fabf@skynet.be> | 2014-06-04 19:05:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:53:51 -0400 |
| commit | 36dfd116edd48fa6174d5694c143f1d4bd81aba8 (patch) | |
| tree | 140446c2260c5d3a6c49b1102f15ce9cef431448 /fs/fscache | |
| parent | 8fe6929cfd43c44834858a53e129ffdc7c166298 (diff) | |
fs/fscache: convert printk to pr_foo()
All printk converted to pr_foo() except internal.h: printk(KERN_DEBUG
Coalesce formats.
Add pr_fmt
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fscache')
| -rw-r--r-- | fs/fscache/cache.c | 13 | ||||
| -rw-r--r-- | fs/fscache/cookie.c | 2 | ||||
| -rw-r--r-- | fs/fscache/internal.h | 26 | ||||
| -rw-r--r-- | fs/fscache/main.c | 7 | ||||
| -rw-r--r-- | fs/fscache/netfs.c | 7 | ||||
| -rw-r--r-- | fs/fscache/operation.c | 3 | ||||
| -rw-r--r-- | fs/fscache/page.c | 6 |
7 files changed, 32 insertions, 32 deletions
diff --git a/fs/fscache/cache.c b/fs/fscache/cache.c index f7cff367db7f..56cce7fdd39e 100644 --- a/fs/fscache/cache.c +++ b/fs/fscache/cache.c | |||
| @@ -280,15 +280,15 @@ int fscache_add_cache(struct fscache_cache *cache, | |||
| 280 | spin_unlock(&fscache_fsdef_index.lock); | 280 | spin_unlock(&fscache_fsdef_index.lock); |
| 281 | up_write(&fscache_addremove_sem); | 281 | up_write(&fscache_addremove_sem); |
| 282 | 282 | ||
| 283 | printk(KERN_NOTICE "FS-Cache: Cache \"%s\" added (type %s)\n", | 283 | pr_notice("Cache \"%s\" added (type %s)\n", |
| 284 | cache->tag->name, cache->ops->name); | 284 | cache->tag->name, cache->ops->name); |
| 285 | kobject_uevent(cache->kobj, KOBJ_ADD); | 285 | kobject_uevent(cache->kobj, KOBJ_ADD); |
| 286 | 286 | ||
| 287 | _leave(" = 0 [%s]", cache->identifier); | 287 | _leave(" = 0 [%s]", cache->identifier); |
| 288 | return 0; | 288 | return 0; |
| 289 | 289 | ||
| 290 | tag_in_use: | 290 | tag_in_use: |
| 291 | printk(KERN_ERR "FS-Cache: Cache tag '%s' already in use\n", tagname); | 291 | pr_err("Cache tag '%s' already in use\n", tagname); |
| 292 | __fscache_release_cache_tag(tag); | 292 | __fscache_release_cache_tag(tag); |
| 293 | _leave(" = -EXIST"); | 293 | _leave(" = -EXIST"); |
| 294 | return -EEXIST; | 294 | return -EEXIST; |
| @@ -317,8 +317,7 @@ EXPORT_SYMBOL(fscache_add_cache); | |||
| 317 | void fscache_io_error(struct fscache_cache *cache) | 317 | void fscache_io_error(struct fscache_cache *cache) |
| 318 | { | 318 | { |
| 319 | if (!test_and_set_bit(FSCACHE_IOERROR, &cache->flags)) | 319 | if (!test_and_set_bit(FSCACHE_IOERROR, &cache->flags)) |
| 320 | printk(KERN_ERR "FS-Cache:" | 320 | pr_err("Cache '%s' stopped due to I/O error\n", |
| 321 | " Cache '%s' stopped due to I/O error\n", | ||
| 322 | cache->ops->name); | 321 | cache->ops->name); |
| 323 | } | 322 | } |
| 324 | EXPORT_SYMBOL(fscache_io_error); | 323 | EXPORT_SYMBOL(fscache_io_error); |
| @@ -369,8 +368,8 @@ void fscache_withdraw_cache(struct fscache_cache *cache) | |||
| 369 | 368 | ||
| 370 | _enter(""); | 369 | _enter(""); |
| 371 | 370 | ||
| 372 | printk(KERN_NOTICE "FS-Cache: Withdrawing cache \"%s\"\n", | 371 | pr_notice("Withdrawing cache \"%s\"\n", |
| 373 | cache->tag->name); | 372 | cache->tag->name); |
| 374 | 373 | ||
| 375 | /* make the cache unavailable for cookie acquisition */ | 374 | /* make the cache unavailable for cookie acquisition */ |
| 376 | if (test_and_set_bit(FSCACHE_CACHE_WITHDRAWN, &cache->flags)) | 375 | if (test_and_set_bit(FSCACHE_CACHE_WITHDRAWN, &cache->flags)) |
diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index 29d7feb62cf7..aec01be91b0a 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c | |||
| @@ -519,7 +519,7 @@ void __fscache_disable_cookie(struct fscache_cookie *cookie, bool invalidate) | |||
| 519 | ASSERTCMP(atomic_read(&cookie->n_active), >, 0); | 519 | ASSERTCMP(atomic_read(&cookie->n_active), >, 0); |
| 520 | 520 | ||
| 521 | if (atomic_read(&cookie->n_children) != 0) { | 521 | if (atomic_read(&cookie->n_children) != 0) { |
| 522 | printk(KERN_ERR "FS-Cache: Cookie '%s' still has children\n", | 522 | pr_err("Cookie '%s' still has children\n", |
| 523 | cookie->def->name); | 523 | cookie->def->name); |
| 524 | BUG(); | 524 | BUG(); |
| 525 | } | 525 | } |
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index 4226f6680b06..bc6c08fcfddd 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h | |||
| @@ -22,6 +22,12 @@ | |||
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #ifdef pr_fmt | ||
| 26 | #undef pr_fmt | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #define pr_fmt(fmt) "FS-Cache: " fmt | ||
| 30 | |||
| 25 | #include <linux/fscache-cache.h> | 31 | #include <linux/fscache-cache.h> |
| 26 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
| 27 | 33 | ||
| @@ -413,8 +419,8 @@ do { \ | |||
| 413 | #define ASSERT(X) \ | 419 | #define ASSERT(X) \ |
| 414 | do { \ | 420 | do { \ |
| 415 | if (unlikely(!(X))) { \ | 421 | if (unlikely(!(X))) { \ |
| 416 | printk(KERN_ERR "\n"); \ | 422 | pr_err("\n"); \ |
| 417 | printk(KERN_ERR "FS-Cache: Assertion failed\n"); \ | 423 | pr_err("Assertion failed\n"); \ |
| 418 | BUG(); \ | 424 | BUG(); \ |
| 419 | } \ | 425 | } \ |
| 420 | } while (0) | 426 | } while (0) |
| @@ -422,9 +428,9 @@ do { \ | |||
| 422 | #define ASSERTCMP(X, OP, Y) \ | 428 | #define ASSERTCMP(X, OP, Y) \ |
| 423 | do { \ | 429 | do { \ |
| 424 | if (unlikely(!((X) OP (Y)))) { \ | 430 | if (unlikely(!((X) OP (Y)))) { \ |
| 425 | printk(KERN_ERR "\n"); \ | 431 | pr_err("\n"); \ |
| 426 | printk(KERN_ERR "FS-Cache: Assertion failed\n"); \ | 432 | pr_err("Assertion failed\n"); \ |
| 427 | printk(KERN_ERR "%lx " #OP " %lx is false\n", \ | 433 | pr_err("%lx " #OP " %lx is false\n", \ |
| 428 | (unsigned long)(X), (unsigned long)(Y)); \ | 434 | (unsigned long)(X), (unsigned long)(Y)); \ |
| 429 | BUG(); \ | 435 | BUG(); \ |
| 430 | } \ | 436 | } \ |
| @@ -433,8 +439,8 @@ do { \ | |||
| 433 | #define ASSERTIF(C, X) \ | 439 | #define ASSERTIF(C, X) \ |
| 434 | do { \ | 440 | do { \ |
| 435 | if (unlikely((C) && !(X))) { \ | 441 | if (unlikely((C) && !(X))) { \ |
| 436 | printk(KERN_ERR "\n"); \ | 442 | pr_err("\n"); \ |
| 437 | printk(KERN_ERR "FS-Cache: Assertion failed\n"); \ | 443 | pr_err("Assertion failed\n"); \ |
| 438 | BUG(); \ | 444 | BUG(); \ |
| 439 | } \ | 445 | } \ |
| 440 | } while (0) | 446 | } while (0) |
| @@ -442,9 +448,9 @@ do { \ | |||
| 442 | #define ASSERTIFCMP(C, X, OP, Y) \ | 448 | #define ASSERTIFCMP(C, X, OP, Y) \ |
| 443 | do { \ | 449 | do { \ |
| 444 | if (unlikely((C) && !((X) OP (Y)))) { \ | 450 | if (unlikely((C) && !((X) OP (Y)))) { \ |
| 445 | printk(KERN_ERR "\n"); \ | 451 | pr_err("\n"); \ |
| 446 | printk(KERN_ERR "FS-Cache: Assertion failed\n"); \ | 452 | pr_err("Assertion failed\n"); \ |
| 447 | printk(KERN_ERR "%lx " #OP " %lx is false\n", \ | 453 | pr_err("%lx " #OP " %lx is false\n", \ |
| 448 | (unsigned long)(X), (unsigned long)(Y)); \ | 454 | (unsigned long)(X), (unsigned long)(Y)); \ |
| 449 | BUG(); \ | 455 | BUG(); \ |
| 450 | } \ | 456 | } \ |
diff --git a/fs/fscache/main.c b/fs/fscache/main.c index 7c27907e650c..acd4bf1fc277 100644 --- a/fs/fscache/main.c +++ b/fs/fscache/main.c | |||
| @@ -146,8 +146,7 @@ static int __init fscache_init(void) | |||
| 146 | 0, | 146 | 0, |
| 147 | fscache_cookie_init_once); | 147 | fscache_cookie_init_once); |
| 148 | if (!fscache_cookie_jar) { | 148 | if (!fscache_cookie_jar) { |
| 149 | printk(KERN_NOTICE | 149 | pr_notice("Failed to allocate a cookie jar\n"); |
| 150 | "FS-Cache: Failed to allocate a cookie jar\n"); | ||
| 151 | ret = -ENOMEM; | 150 | ret = -ENOMEM; |
| 152 | goto error_cookie_jar; | 151 | goto error_cookie_jar; |
| 153 | } | 152 | } |
| @@ -156,7 +155,7 @@ static int __init fscache_init(void) | |||
| 156 | if (!fscache_root) | 155 | if (!fscache_root) |
| 157 | goto error_kobj; | 156 | goto error_kobj; |
| 158 | 157 | ||
| 159 | printk(KERN_NOTICE "FS-Cache: Loaded\n"); | 158 | pr_notice("Loaded\n"); |
| 160 | return 0; | 159 | return 0; |
| 161 | 160 | ||
| 162 | error_kobj: | 161 | error_kobj: |
| @@ -192,7 +191,7 @@ static void __exit fscache_exit(void) | |||
| 192 | fscache_proc_cleanup(); | 191 | fscache_proc_cleanup(); |
| 193 | destroy_workqueue(fscache_op_wq); | 192 | destroy_workqueue(fscache_op_wq); |
| 194 | destroy_workqueue(fscache_object_wq); | 193 | destroy_workqueue(fscache_object_wq); |
| 195 | printk(KERN_NOTICE "FS-Cache: Unloaded\n"); | 194 | pr_notice("Unloaded\n"); |
| 196 | } | 195 | } |
| 197 | 196 | ||
| 198 | module_exit(fscache_exit); | 197 | module_exit(fscache_exit); |
diff --git a/fs/fscache/netfs.c b/fs/fscache/netfs.c index 989f39401547..6d941f56faf4 100644 --- a/fs/fscache/netfs.c +++ b/fs/fscache/netfs.c | |||
| @@ -65,8 +65,7 @@ int __fscache_register_netfs(struct fscache_netfs *netfs) | |||
| 65 | list_add(&netfs->link, &fscache_netfs_list); | 65 | list_add(&netfs->link, &fscache_netfs_list); |
| 66 | ret = 0; | 66 | ret = 0; |
| 67 | 67 | ||
| 68 | printk(KERN_NOTICE "FS-Cache: Netfs '%s' registered for caching\n", | 68 | pr_notice("Netfs '%s' registered for caching\n", netfs->name); |
| 69 | netfs->name); | ||
| 70 | 69 | ||
| 71 | already_registered: | 70 | already_registered: |
| 72 | up_write(&fscache_addremove_sem); | 71 | up_write(&fscache_addremove_sem); |
| @@ -97,8 +96,8 @@ void __fscache_unregister_netfs(struct fscache_netfs *netfs) | |||
| 97 | 96 | ||
| 98 | up_write(&fscache_addremove_sem); | 97 | up_write(&fscache_addremove_sem); |
| 99 | 98 | ||
| 100 | printk(KERN_NOTICE "FS-Cache: Netfs '%s' unregistered from caching\n", | 99 | pr_notice("Netfs '%s' unregistered from caching\n", |
| 101 | netfs->name); | 100 | netfs->name); |
| 102 | 101 | ||
| 103 | _leave(""); | 102 | _leave(""); |
| 104 | } | 103 | } |
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c index 318071aca217..e7b87a0e5185 100644 --- a/fs/fscache/operation.c +++ b/fs/fscache/operation.c | |||
| @@ -51,8 +51,7 @@ void fscache_enqueue_operation(struct fscache_operation *op) | |||
| 51 | _debug("queue for caller's attention"); | 51 | _debug("queue for caller's attention"); |
| 52 | break; | 52 | break; |
| 53 | default: | 53 | default: |
| 54 | printk(KERN_ERR "FS-Cache: Unexpected op type %lx", | 54 | pr_err("Unexpected op type %lx", op->flags); |
| 55 | op->flags); | ||
| 56 | BUG(); | 55 | BUG(); |
| 57 | break; | 56 | break; |
| 58 | } | 57 | } |
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index 7f5c658af755..ed70714503fa 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c | |||
| @@ -1108,10 +1108,8 @@ void fscache_mark_page_cached(struct fscache_retrieval *op, struct page *page) | |||
| 1108 | static bool once_only; | 1108 | static bool once_only; |
| 1109 | if (!once_only) { | 1109 | if (!once_only) { |
| 1110 | once_only = true; | 1110 | once_only = true; |
| 1111 | printk(KERN_WARNING "FS-Cache:" | 1111 | pr_warn("Cookie type %s marked page %lx multiple times\n", |
| 1112 | " Cookie type %s marked page %lx" | 1112 | cookie->def->name, page->index); |
| 1113 | " multiple times\n", | ||
| 1114 | cookie->def->name, page->index); | ||
| 1115 | } | 1113 | } |
| 1116 | } | 1114 | } |
| 1117 | 1115 | ||
