diff options
| author | Fabian Frederick <fabf@skynet.be> | 2014-06-06 17:37:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:14 -0400 |
| commit | 0227d6abb378454e10d385da6a0f8b79a5b02c27 (patch) | |
| tree | e85a3019e054d8cbbaa20f0b98a30653a0432701 /fs/cachefiles | |
| parent | 4e1eb88305135248ad0e927449e457df95d8d9b3 (diff) | |
fs/cachefiles: replace kerror by pr_err
Also add pr_fmt in internal.h
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/cachefiles')
| -rw-r--r-- | fs/cachefiles/bind.c | 13 | ||||
| -rw-r--r-- | fs/cachefiles/daemon.c | 31 | ||||
| -rw-r--r-- | fs/cachefiles/interface.c | 2 | ||||
| -rw-r--r-- | fs/cachefiles/internal.h | 18 | ||||
| -rw-r--r-- | fs/cachefiles/main.c | 8 | ||||
| -rw-r--r-- | fs/cachefiles/namei.c | 24 | ||||
| -rw-r--r-- | fs/cachefiles/security.c | 6 | ||||
| -rw-r--r-- | fs/cachefiles/xattr.c | 10 |
8 files changed, 58 insertions, 54 deletions
diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c index c7f3dd2b79dd..d749731dc0ee 100644 --- a/fs/cachefiles/bind.c +++ b/fs/cachefiles/bind.c | |||
| @@ -50,18 +50,18 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args) | |||
| 50 | cache->brun_percent < 100); | 50 | cache->brun_percent < 100); |
| 51 | 51 | ||
| 52 | if (*args) { | 52 | if (*args) { |
| 53 | kerror("'bind' command doesn't take an argument"); | 53 | pr_err("'bind' command doesn't take an argument"); |
| 54 | return -EINVAL; | 54 | return -EINVAL; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | if (!cache->rootdirname) { | 57 | if (!cache->rootdirname) { |
| 58 | kerror("No cache directory specified"); | 58 | pr_err("No cache directory specified"); |
| 59 | return -EINVAL; | 59 | return -EINVAL; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | /* don't permit already bound caches to be re-bound */ | 62 | /* don't permit already bound caches to be re-bound */ |
| 63 | if (test_bit(CACHEFILES_READY, &cache->flags)) { | 63 | if (test_bit(CACHEFILES_READY, &cache->flags)) { |
| 64 | kerror("Cache already bound"); | 64 | pr_err("Cache already bound"); |
| 65 | return -EBUSY; | 65 | return -EBUSY; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| @@ -228,8 +228,7 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache) | |||
| 228 | set_bit(CACHEFILES_READY, &cache->flags); | 228 | set_bit(CACHEFILES_READY, &cache->flags); |
| 229 | dput(root); | 229 | dput(root); |
| 230 | 230 | ||
| 231 | pr_info("CacheFiles: File cache on %s registered\n", | 231 | pr_info("File cache on %s registered\n", cache->cache.identifier); |
| 232 | cache->cache.identifier); | ||
| 233 | 232 | ||
| 234 | /* check how much space the cache has */ | 233 | /* check how much space the cache has */ |
| 235 | cachefiles_has_space(cache, 0, 0); | 234 | cachefiles_has_space(cache, 0, 0); |
| @@ -249,7 +248,7 @@ error_open_root: | |||
| 249 | kmem_cache_free(cachefiles_object_jar, fsdef); | 248 | kmem_cache_free(cachefiles_object_jar, fsdef); |
| 250 | error_root_object: | 249 | error_root_object: |
| 251 | cachefiles_end_secure(cache, saved_cred); | 250 | cachefiles_end_secure(cache, saved_cred); |
| 252 | kerror("Failed to register: %d", ret); | 251 | pr_err("Failed to register: %d", ret); |
| 253 | return ret; | 252 | return ret; |
| 254 | } | 253 | } |
| 255 | 254 | ||
| @@ -261,7 +260,7 @@ void cachefiles_daemon_unbind(struct cachefiles_cache *cache) | |||
| 261 | _enter(""); | 260 | _enter(""); |
| 262 | 261 | ||
| 263 | if (test_bit(CACHEFILES_READY, &cache->flags)) { | 262 | if (test_bit(CACHEFILES_READY, &cache->flags)) { |
| 264 | pr_info("CacheFiles: File cache on %s unregistering\n", | 263 | pr_info("File cache on %s unregistering\n", |
| 265 | cache->cache.identifier); | 264 | cache->cache.identifier); |
| 266 | 265 | ||
| 267 | fscache_withdraw_cache(&cache->cache); | 266 | fscache_withdraw_cache(&cache->cache); |
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 0a1467b15516..b078d3081d6c 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c | |||
| @@ -315,8 +315,7 @@ static unsigned int cachefiles_daemon_poll(struct file *file, | |||
| 315 | static int cachefiles_daemon_range_error(struct cachefiles_cache *cache, | 315 | static int cachefiles_daemon_range_error(struct cachefiles_cache *cache, |
| 316 | char *args) | 316 | char *args) |
| 317 | { | 317 | { |
| 318 | kerror("Free space limits must be in range" | 318 | pr_err("Free space limits must be in range 0%%<=stop<cull<run<100%%"); |
| 319 | " 0%%<=stop<cull<run<100%%"); | ||
| 320 | 319 | ||
| 321 | return -EINVAL; | 320 | return -EINVAL; |
| 322 | } | 321 | } |
| @@ -476,12 +475,12 @@ static int cachefiles_daemon_dir(struct cachefiles_cache *cache, char *args) | |||
| 476 | _enter(",%s", args); | 475 | _enter(",%s", args); |
| 477 | 476 | ||
| 478 | if (!*args) { | 477 | if (!*args) { |
| 479 | kerror("Empty directory specified"); | 478 | pr_err("Empty directory specified"); |
| 480 | return -EINVAL; | 479 | return -EINVAL; |
| 481 | } | 480 | } |
| 482 | 481 | ||
| 483 | if (cache->rootdirname) { | 482 | if (cache->rootdirname) { |
| 484 | kerror("Second cache directory specified"); | 483 | pr_err("Second cache directory specified"); |
| 485 | return -EEXIST; | 484 | return -EEXIST; |
| 486 | } | 485 | } |
| 487 | 486 | ||
| @@ -504,12 +503,12 @@ static int cachefiles_daemon_secctx(struct cachefiles_cache *cache, char *args) | |||
| 504 | _enter(",%s", args); | 503 | _enter(",%s", args); |
| 505 | 504 | ||
| 506 | if (!*args) { | 505 | if (!*args) { |
| 507 | kerror("Empty security context specified"); | 506 | pr_err("Empty security context specified"); |
| 508 | return -EINVAL; | 507 | return -EINVAL; |
| 509 | } | 508 | } |
| 510 | 509 | ||
| 511 | if (cache->secctx) { | 510 | if (cache->secctx) { |
| 512 | kerror("Second security context specified"); | 511 | pr_err("Second security context specified"); |
| 513 | return -EINVAL; | 512 | return -EINVAL; |
| 514 | } | 513 | } |
| 515 | 514 | ||
| @@ -532,7 +531,7 @@ static int cachefiles_daemon_tag(struct cachefiles_cache *cache, char *args) | |||
| 532 | _enter(",%s", args); | 531 | _enter(",%s", args); |
| 533 | 532 | ||
| 534 | if (!*args) { | 533 | if (!*args) { |
| 535 | kerror("Empty tag specified"); | 534 | pr_err("Empty tag specified"); |
| 536 | return -EINVAL; | 535 | return -EINVAL; |
| 537 | } | 536 | } |
| 538 | 537 | ||
| @@ -563,12 +562,12 @@ static int cachefiles_daemon_cull(struct cachefiles_cache *cache, char *args) | |||
| 563 | goto inval; | 562 | goto inval; |
| 564 | 563 | ||
| 565 | if (!test_bit(CACHEFILES_READY, &cache->flags)) { | 564 | if (!test_bit(CACHEFILES_READY, &cache->flags)) { |
| 566 | kerror("cull applied to unready cache"); | 565 | pr_err("cull applied to unready cache"); |
| 567 | return -EIO; | 566 | return -EIO; |
| 568 | } | 567 | } |
| 569 | 568 | ||
| 570 | if (test_bit(CACHEFILES_DEAD, &cache->flags)) { | 569 | if (test_bit(CACHEFILES_DEAD, &cache->flags)) { |
| 571 | kerror("cull applied to dead cache"); | 570 | pr_err("cull applied to dead cache"); |
| 572 | return -EIO; | 571 | return -EIO; |
| 573 | } | 572 | } |
| 574 | 573 | ||
| @@ -588,11 +587,11 @@ static int cachefiles_daemon_cull(struct cachefiles_cache *cache, char *args) | |||
| 588 | 587 | ||
| 589 | notdir: | 588 | notdir: |
| 590 | path_put(&path); | 589 | path_put(&path); |
| 591 | kerror("cull command requires dirfd to be a directory"); | 590 | pr_err("cull command requires dirfd to be a directory"); |
| 592 | return -ENOTDIR; | 591 | return -ENOTDIR; |
| 593 | 592 | ||
| 594 | inval: | 593 | inval: |
| 595 | kerror("cull command requires dirfd and filename"); | 594 | pr_err("cull command requires dirfd and filename"); |
| 596 | return -EINVAL; | 595 | return -EINVAL; |
| 597 | } | 596 | } |
| 598 | 597 | ||
| @@ -615,7 +614,7 @@ static int cachefiles_daemon_debug(struct cachefiles_cache *cache, char *args) | |||
| 615 | return 0; | 614 | return 0; |
| 616 | 615 | ||
| 617 | inval: | 616 | inval: |
| 618 | kerror("debug command requires mask"); | 617 | pr_err("debug command requires mask"); |
| 619 | return -EINVAL; | 618 | return -EINVAL; |
| 620 | } | 619 | } |
| 621 | 620 | ||
| @@ -635,12 +634,12 @@ static int cachefiles_daemon_inuse(struct cachefiles_cache *cache, char *args) | |||
| 635 | goto inval; | 634 | goto inval; |
| 636 | 635 | ||
| 637 | if (!test_bit(CACHEFILES_READY, &cache->flags)) { | 636 | if (!test_bit(CACHEFILES_READY, &cache->flags)) { |
| 638 | kerror("inuse applied to unready cache"); | 637 | pr_err("inuse applied to unready cache"); |
| 639 | return -EIO; | 638 | return -EIO; |
| 640 | } | 639 | } |
| 641 | 640 | ||
| 642 | if (test_bit(CACHEFILES_DEAD, &cache->flags)) { | 641 | if (test_bit(CACHEFILES_DEAD, &cache->flags)) { |
| 643 | kerror("inuse applied to dead cache"); | 642 | pr_err("inuse applied to dead cache"); |
| 644 | return -EIO; | 643 | return -EIO; |
| 645 | } | 644 | } |
| 646 | 645 | ||
| @@ -660,11 +659,11 @@ static int cachefiles_daemon_inuse(struct cachefiles_cache *cache, char *args) | |||
| 660 | 659 | ||
| 661 | notdir: | 660 | notdir: |
| 662 | path_put(&path); | 661 | path_put(&path); |
| 663 | kerror("inuse command requires dirfd to be a directory"); | 662 | pr_err("inuse command requires dirfd to be a directory"); |
| 664 | return -ENOTDIR; | 663 | return -ENOTDIR; |
| 665 | 664 | ||
| 666 | inval: | 665 | inval: |
| 667 | kerror("inuse command requires dirfd and filename"); | 666 | pr_err("inuse command requires dirfd and filename"); |
| 668 | return -EINVAL; | 667 | return -EINVAL; |
| 669 | } | 668 | } |
| 670 | 669 | ||
diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index e47a8d87852f..584743d456c3 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c | |||
| @@ -146,7 +146,7 @@ static int cachefiles_lookup_object(struct fscache_object *_object) | |||
| 146 | 146 | ||
| 147 | if (ret < 0 && ret != -ETIMEDOUT) { | 147 | if (ret < 0 && ret != -ETIMEDOUT) { |
| 148 | if (ret != -ENOBUFS) | 148 | if (ret != -ENOBUFS) |
| 149 | pr_warn("CacheFiles: Lookup failed error %d\n", ret); | 149 | pr_warn("Lookup failed error %d\n", ret); |
| 150 | fscache_object_lookup_error(&object->fscache); | 150 | fscache_object_lookup_error(&object->fscache); |
| 151 | } | 151 | } |
| 152 | 152 | ||
diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h index 5c7ec647e44c..3d50998abf57 100644 --- a/fs/cachefiles/internal.h +++ b/fs/cachefiles/internal.h | |||
| @@ -9,6 +9,13 @@ | |||
| 9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #ifdef pr_fmt | ||
| 13 | #undef pr_fmt | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #define pr_fmt(fmt) "CacheFiles: " fmt | ||
| 17 | |||
| 18 | |||
| 12 | #include <linux/fscache-cache.h> | 19 | #include <linux/fscache-cache.h> |
| 13 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
| 14 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
| @@ -245,11 +252,10 @@ extern int cachefiles_remove_object_xattr(struct cachefiles_cache *cache, | |||
| 245 | /* | 252 | /* |
| 246 | * error handling | 253 | * error handling |
| 247 | */ | 254 | */ |
| 248 | #define kerror(FMT, ...) pr_err("CacheFiles: "FMT"\n", ##__VA_ARGS__) | ||
| 249 | 255 | ||
| 250 | #define cachefiles_io_error(___cache, FMT, ...) \ | 256 | #define cachefiles_io_error(___cache, FMT, ...) \ |
| 251 | do { \ | 257 | do { \ |
| 252 | kerror("I/O Error: " FMT, ##__VA_ARGS__); \ | 258 | pr_err("I/O Error: " FMT, ##__VA_ARGS__); \ |
| 253 | fscache_io_error(&(___cache)->cache); \ | 259 | fscache_io_error(&(___cache)->cache); \ |
| 254 | set_bit(CACHEFILES_DEAD, &(___cache)->flags); \ | 260 | set_bit(CACHEFILES_DEAD, &(___cache)->flags); \ |
| 255 | } while (0) | 261 | } while (0) |
| @@ -311,7 +317,7 @@ do { \ | |||
| 311 | do { \ | 317 | do { \ |
| 312 | if (unlikely(!(X))) { \ | 318 | if (unlikely(!(X))) { \ |
| 313 | pr_err("\n"); \ | 319 | pr_err("\n"); \ |
| 314 | pr_err("CacheFiles: Assertion failed\n"); \ | 320 | pr_err("Assertion failed\n"); \ |
| 315 | BUG(); \ | 321 | BUG(); \ |
| 316 | } \ | 322 | } \ |
| 317 | } while (0) | 323 | } while (0) |
| @@ -320,7 +326,7 @@ do { \ | |||
| 320 | do { \ | 326 | do { \ |
| 321 | if (unlikely(!((X) OP (Y)))) { \ | 327 | if (unlikely(!((X) OP (Y)))) { \ |
| 322 | pr_err("\n"); \ | 328 | pr_err("\n"); \ |
| 323 | pr_err("CacheFiles: Assertion failed\n"); \ | 329 | pr_err("Assertion failed\n"); \ |
| 324 | pr_err("%lx " #OP " %lx is false\n", \ | 330 | pr_err("%lx " #OP " %lx is false\n", \ |
| 325 | (unsigned long)(X), (unsigned long)(Y)); \ | 331 | (unsigned long)(X), (unsigned long)(Y)); \ |
| 326 | BUG(); \ | 332 | BUG(); \ |
| @@ -331,7 +337,7 @@ do { \ | |||
| 331 | do { \ | 337 | do { \ |
| 332 | if (unlikely((C) && !(X))) { \ | 338 | if (unlikely((C) && !(X))) { \ |
| 333 | pr_err("\n"); \ | 339 | pr_err("\n"); \ |
| 334 | pr_err("CacheFiles: Assertion failed\n"); \ | 340 | pr_err("Assertion failed\n"); \ |
| 335 | BUG(); \ | 341 | BUG(); \ |
| 336 | } \ | 342 | } \ |
| 337 | } while (0) | 343 | } while (0) |
| @@ -340,7 +346,7 @@ do { \ | |||
| 340 | do { \ | 346 | do { \ |
| 341 | if (unlikely((C) && !((X) OP (Y)))) { \ | 347 | if (unlikely((C) && !((X) OP (Y)))) { \ |
| 342 | pr_err("\n"); \ | 348 | pr_err("\n"); \ |
| 343 | pr_err("CacheFiles: Assertion failed\n"); \ | 349 | pr_err("Assertion failed\n"); \ |
| 344 | pr_err("%lx " #OP " %lx is false\n", \ | 350 | pr_err("%lx " #OP " %lx is false\n", \ |
| 345 | (unsigned long)(X), (unsigned long)(Y)); \ | 351 | (unsigned long)(X), (unsigned long)(Y)); \ |
| 346 | BUG(); \ | 352 | BUG(); \ |
diff --git a/fs/cachefiles/main.c b/fs/cachefiles/main.c index d45c59c147ce..180edfb45f66 100644 --- a/fs/cachefiles/main.c +++ b/fs/cachefiles/main.c | |||
| @@ -68,7 +68,7 @@ static int __init cachefiles_init(void) | |||
| 68 | SLAB_HWCACHE_ALIGN, | 68 | SLAB_HWCACHE_ALIGN, |
| 69 | cachefiles_object_init_once); | 69 | cachefiles_object_init_once); |
| 70 | if (!cachefiles_object_jar) { | 70 | if (!cachefiles_object_jar) { |
| 71 | pr_notice("CacheFiles: Failed to allocate an object jar\n"); | 71 | pr_notice("Failed to allocate an object jar\n"); |
| 72 | goto error_object_jar; | 72 | goto error_object_jar; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| @@ -76,7 +76,7 @@ static int __init cachefiles_init(void) | |||
| 76 | if (ret < 0) | 76 | if (ret < 0) |
| 77 | goto error_proc; | 77 | goto error_proc; |
| 78 | 78 | ||
| 79 | pr_info("CacheFiles: Loaded\n"); | 79 | pr_info("Loaded\n"); |
| 80 | return 0; | 80 | return 0; |
| 81 | 81 | ||
| 82 | error_proc: | 82 | error_proc: |
| @@ -84,7 +84,7 @@ error_proc: | |||
| 84 | error_object_jar: | 84 | error_object_jar: |
| 85 | misc_deregister(&cachefiles_dev); | 85 | misc_deregister(&cachefiles_dev); |
| 86 | error_dev: | 86 | error_dev: |
| 87 | kerror("failed to register: %d", ret); | 87 | pr_err("failed to register: %d", ret); |
| 88 | return ret; | 88 | return ret; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -95,7 +95,7 @@ fs_initcall(cachefiles_init); | |||
| 95 | */ | 95 | */ |
| 96 | static void __exit cachefiles_exit(void) | 96 | static void __exit cachefiles_exit(void) |
| 97 | { | 97 | { |
| 98 | pr_info("CacheFiles: Unloading\n"); | 98 | pr_info("Unloading\n"); |
| 99 | 99 | ||
| 100 | cachefiles_proc_cleanup(); | 100 | cachefiles_proc_cleanup(); |
| 101 | kmem_cache_destroy(cachefiles_object_jar); | 101 | kmem_cache_destroy(cachefiles_object_jar); |
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 18e0d8ee3542..5bf2b41e66d3 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
| @@ -131,10 +131,10 @@ found_dentry: | |||
| 131 | 131 | ||
| 132 | if (fscache_object_is_live(&object->fscache)) { | 132 | if (fscache_object_is_live(&object->fscache)) { |
| 133 | pr_err("\n"); | 133 | pr_err("\n"); |
| 134 | pr_err("CacheFiles: Error: Can't preemptively bury live object\n"); | 134 | pr_err("Error: Can't preemptively bury live object\n"); |
| 135 | cachefiles_printk_object(object, NULL); | 135 | cachefiles_printk_object(object, NULL); |
| 136 | } else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { | 136 | } else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { |
| 137 | pr_err("CacheFiles: Error: Object already preemptively buried\n"); | 137 | pr_err("Error: Object already preemptively buried\n"); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | write_unlock(&cache->active_lock); | 140 | write_unlock(&cache->active_lock); |
| @@ -157,7 +157,7 @@ try_again: | |||
| 157 | write_lock(&cache->active_lock); | 157 | write_lock(&cache->active_lock); |
| 158 | 158 | ||
| 159 | if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { | 159 | if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { |
| 160 | pr_err("CacheFiles: Error: Object already active\n"); | 160 | pr_err("Error: Object already active\n"); |
| 161 | cachefiles_printk_object(object, NULL); | 161 | cachefiles_printk_object(object, NULL); |
| 162 | BUG(); | 162 | BUG(); |
| 163 | } | 163 | } |
| @@ -191,7 +191,7 @@ try_again: | |||
| 191 | wait_for_old_object: | 191 | wait_for_old_object: |
| 192 | if (fscache_object_is_live(&object->fscache)) { | 192 | if (fscache_object_is_live(&object->fscache)) { |
| 193 | pr_err("\n"); | 193 | pr_err("\n"); |
| 194 | pr_err("CacheFiles: Error: Unexpected object collision\n"); | 194 | pr_err("Error: Unexpected object collision\n"); |
| 195 | cachefiles_printk_object(object, xobject); | 195 | cachefiles_printk_object(object, xobject); |
| 196 | BUG(); | 196 | BUG(); |
| 197 | } | 197 | } |
| @@ -238,7 +238,7 @@ wait_for_old_object: | |||
| 238 | 238 | ||
| 239 | if (timeout <= 0) { | 239 | if (timeout <= 0) { |
| 240 | pr_err("\n"); | 240 | pr_err("\n"); |
| 241 | pr_err("CacheFiles: Error: Overlong wait for old active object to go away\n"); | 241 | pr_err("Error: Overlong wait for old active object to go away\n"); |
| 242 | cachefiles_printk_object(object, xobject); | 242 | cachefiles_printk_object(object, xobject); |
| 243 | goto requeue; | 243 | goto requeue; |
| 244 | } | 244 | } |
| @@ -543,7 +543,7 @@ lookup_again: | |||
| 543 | next, next->d_inode, next->d_inode->i_ino); | 543 | next, next->d_inode, next->d_inode->i_ino); |
| 544 | 544 | ||
| 545 | } else if (!S_ISDIR(next->d_inode->i_mode)) { | 545 | } else if (!S_ISDIR(next->d_inode->i_mode)) { |
| 546 | kerror("inode %lu is not a directory", | 546 | pr_err("inode %lu is not a directory", |
| 547 | next->d_inode->i_ino); | 547 | next->d_inode->i_ino); |
| 548 | ret = -ENOBUFS; | 548 | ret = -ENOBUFS; |
| 549 | goto error; | 549 | goto error; |
| @@ -574,7 +574,7 @@ lookup_again: | |||
| 574 | } else if (!S_ISDIR(next->d_inode->i_mode) && | 574 | } else if (!S_ISDIR(next->d_inode->i_mode) && |
| 575 | !S_ISREG(next->d_inode->i_mode) | 575 | !S_ISREG(next->d_inode->i_mode) |
| 576 | ) { | 576 | ) { |
| 577 | kerror("inode %lu is not a file or directory", | 577 | pr_err("inode %lu is not a file or directory", |
| 578 | next->d_inode->i_ino); | 578 | next->d_inode->i_ino); |
| 579 | ret = -ENOBUFS; | 579 | ret = -ENOBUFS; |
| 580 | goto error; | 580 | goto error; |
| @@ -768,7 +768,7 @@ struct dentry *cachefiles_get_directory(struct cachefiles_cache *cache, | |||
| 768 | ASSERT(subdir->d_inode); | 768 | ASSERT(subdir->d_inode); |
| 769 | 769 | ||
| 770 | if (!S_ISDIR(subdir->d_inode->i_mode)) { | 770 | if (!S_ISDIR(subdir->d_inode->i_mode)) { |
| 771 | kerror("%s is not a directory", dirname); | 771 | pr_err("%s is not a directory", dirname); |
| 772 | ret = -EIO; | 772 | ret = -EIO; |
| 773 | goto check_error; | 773 | goto check_error; |
| 774 | } | 774 | } |
| @@ -795,13 +795,13 @@ check_error: | |||
| 795 | mkdir_error: | 795 | mkdir_error: |
| 796 | mutex_unlock(&dir->d_inode->i_mutex); | 796 | mutex_unlock(&dir->d_inode->i_mutex); |
| 797 | dput(subdir); | 797 | dput(subdir); |
| 798 | kerror("mkdir %s failed with error %d", dirname, ret); | 798 | pr_err("mkdir %s failed with error %d", dirname, ret); |
| 799 | return ERR_PTR(ret); | 799 | return ERR_PTR(ret); |
| 800 | 800 | ||
| 801 | lookup_error: | 801 | lookup_error: |
| 802 | mutex_unlock(&dir->d_inode->i_mutex); | 802 | mutex_unlock(&dir->d_inode->i_mutex); |
| 803 | ret = PTR_ERR(subdir); | 803 | ret = PTR_ERR(subdir); |
| 804 | kerror("Lookup %s failed with error %d", dirname, ret); | 804 | pr_err("Lookup %s failed with error %d", dirname, ret); |
| 805 | return ERR_PTR(ret); | 805 | return ERR_PTR(ret); |
| 806 | 806 | ||
| 807 | nomem_d_alloc: | 807 | nomem_d_alloc: |
| @@ -891,7 +891,7 @@ lookup_error: | |||
| 891 | if (ret == -EIO) { | 891 | if (ret == -EIO) { |
| 892 | cachefiles_io_error(cache, "Lookup failed"); | 892 | cachefiles_io_error(cache, "Lookup failed"); |
| 893 | } else if (ret != -ENOMEM) { | 893 | } else if (ret != -ENOMEM) { |
| 894 | kerror("Internal error: %d", ret); | 894 | pr_err("Internal error: %d", ret); |
| 895 | ret = -EIO; | 895 | ret = -EIO; |
| 896 | } | 896 | } |
| 897 | 897 | ||
| @@ -950,7 +950,7 @@ error: | |||
| 950 | } | 950 | } |
| 951 | 951 | ||
| 952 | if (ret != -ENOMEM) { | 952 | if (ret != -ENOMEM) { |
| 953 | kerror("Internal error: %d", ret); | 953 | pr_err("Internal error: %d", ret); |
| 954 | ret = -EIO; | 954 | ret = -EIO; |
| 955 | } | 955 | } |
| 956 | 956 | ||
diff --git a/fs/cachefiles/security.c b/fs/cachefiles/security.c index 7a6b665f6b1a..396c18ea2764 100644 --- a/fs/cachefiles/security.c +++ b/fs/cachefiles/security.c | |||
| @@ -34,7 +34,7 @@ int cachefiles_get_security_ID(struct cachefiles_cache *cache) | |||
| 34 | ret = set_security_override_from_ctx(new, cache->secctx); | 34 | ret = set_security_override_from_ctx(new, cache->secctx); |
| 35 | if (ret < 0) { | 35 | if (ret < 0) { |
| 36 | put_cred(new); | 36 | put_cred(new); |
| 37 | pr_err("CacheFiles: Security denies permission to nominate security context: error %d\n", | 37 | pr_err("Security denies permission to nominate security context: error %d\n", |
| 38 | ret); | 38 | ret); |
| 39 | goto error; | 39 | goto error; |
| 40 | } | 40 | } |
| @@ -57,14 +57,14 @@ static int cachefiles_check_cache_dir(struct cachefiles_cache *cache, | |||
| 57 | 57 | ||
| 58 | ret = security_inode_mkdir(root->d_inode, root, 0); | 58 | ret = security_inode_mkdir(root->d_inode, root, 0); |
| 59 | if (ret < 0) { | 59 | if (ret < 0) { |
| 60 | pr_err("CacheFiles: Security denies permission to make dirs: error %d", | 60 | pr_err("Security denies permission to make dirs: error %d", |
| 61 | ret); | 61 | ret); |
| 62 | return ret; | 62 | return ret; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | ret = security_inode_create(root->d_inode, root, 0); | 65 | ret = security_inode_create(root->d_inode, root, 0); |
| 66 | if (ret < 0) | 66 | if (ret < 0) |
| 67 | pr_err("CacheFiles: Security denies permission to create files: error %d", | 67 | pr_err("Security denies permission to create files: error %d", |
| 68 | ret); | 68 | ret); |
| 69 | 69 | ||
| 70 | return ret; | 70 | return ret; |
diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c index 12b0eef84183..1ad51ffbb275 100644 --- a/fs/cachefiles/xattr.c +++ b/fs/cachefiles/xattr.c | |||
| @@ -51,7 +51,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object) | |||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | if (ret != -EEXIST) { | 53 | if (ret != -EEXIST) { |
| 54 | kerror("Can't set xattr on %*.*s [%lu] (err %d)", | 54 | pr_err("Can't set xattr on %*.*s [%lu] (err %d)", |
| 55 | dentry->d_name.len, dentry->d_name.len, | 55 | dentry->d_name.len, dentry->d_name.len, |
| 56 | dentry->d_name.name, dentry->d_inode->i_ino, | 56 | dentry->d_name.name, dentry->d_inode->i_ino, |
| 57 | -ret); | 57 | -ret); |
| @@ -64,7 +64,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object) | |||
| 64 | if (ret == -ERANGE) | 64 | if (ret == -ERANGE) |
| 65 | goto bad_type_length; | 65 | goto bad_type_length; |
| 66 | 66 | ||
| 67 | kerror("Can't read xattr on %*.*s [%lu] (err %d)", | 67 | pr_err("Can't read xattr on %*.*s [%lu] (err %d)", |
| 68 | dentry->d_name.len, dentry->d_name.len, | 68 | dentry->d_name.len, dentry->d_name.len, |
| 69 | dentry->d_name.name, dentry->d_inode->i_ino, | 69 | dentry->d_name.name, dentry->d_inode->i_ino, |
| 70 | -ret); | 70 | -ret); |
| @@ -85,14 +85,14 @@ error: | |||
| 85 | return ret; | 85 | return ret; |
| 86 | 86 | ||
| 87 | bad_type_length: | 87 | bad_type_length: |
| 88 | kerror("Cache object %lu type xattr length incorrect", | 88 | pr_err("Cache object %lu type xattr length incorrect", |
| 89 | dentry->d_inode->i_ino); | 89 | dentry->d_inode->i_ino); |
| 90 | ret = -EIO; | 90 | ret = -EIO; |
| 91 | goto error; | 91 | goto error; |
| 92 | 92 | ||
| 93 | bad_type: | 93 | bad_type: |
| 94 | xtype[2] = 0; | 94 | xtype[2] = 0; |
| 95 | kerror("Cache object %*.*s [%lu] type %s not %s", | 95 | pr_err("Cache object %*.*s [%lu] type %s not %s", |
| 96 | dentry->d_name.len, dentry->d_name.len, | 96 | dentry->d_name.len, dentry->d_name.len, |
| 97 | dentry->d_name.name, dentry->d_inode->i_ino, | 97 | dentry->d_name.name, dentry->d_inode->i_ino, |
| 98 | xtype, type); | 98 | xtype, type); |
| @@ -293,7 +293,7 @@ error: | |||
| 293 | return ret; | 293 | return ret; |
| 294 | 294 | ||
| 295 | bad_type_length: | 295 | bad_type_length: |
| 296 | kerror("Cache object %lu xattr length incorrect", | 296 | pr_err("Cache object %lu xattr length incorrect", |
| 297 | dentry->d_inode->i_ino); | 297 | dentry->d_inode->i_ino); |
| 298 | ret = -EIO; | 298 | ret = -EIO; |
| 299 | goto error; | 299 | goto error; |
