Commit 6ff66ac77aeaa9c13db28784e1c50c027a1f487b
Committed by
Linus Torvalds
1 parent
6f3aabd183
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
fs/cachefiles: add missing \n to kerror conversions
Commit 0227d6abb378 ("fs/cachefiles: replace kerror by pr_err") didn't include newline featuring in original kerror definition Signed-off-by: Fabian Frederick <fabf@skynet.be> Reported-by: David Howells <dhowells@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Cc: <stable@vger.kernel.org> [3.16.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 6 changed files with 33 additions and 33 deletions Side-by-side Diff
fs/cachefiles/bind.c
... | ... | @@ -50,18 +50,18 @@ |
50 | 50 | cache->brun_percent < 100); |
51 | 51 | |
52 | 52 | if (*args) { |
53 | - pr_err("'bind' command doesn't take an argument"); | |
53 | + pr_err("'bind' command doesn't take an argument\n"); | |
54 | 54 | return -EINVAL; |
55 | 55 | } |
56 | 56 | |
57 | 57 | if (!cache->rootdirname) { |
58 | - pr_err("No cache directory specified"); | |
58 | + pr_err("No cache directory specified\n"); | |
59 | 59 | return -EINVAL; |
60 | 60 | } |
61 | 61 | |
62 | 62 | /* don't permit already bound caches to be re-bound */ |
63 | 63 | if (test_bit(CACHEFILES_READY, &cache->flags)) { |
64 | - pr_err("Cache already bound"); | |
64 | + pr_err("Cache already bound\n"); | |
65 | 65 | return -EBUSY; |
66 | 66 | } |
67 | 67 | |
... | ... | @@ -248,7 +248,7 @@ |
248 | 248 | kmem_cache_free(cachefiles_object_jar, fsdef); |
249 | 249 | error_root_object: |
250 | 250 | cachefiles_end_secure(cache, saved_cred); |
251 | - pr_err("Failed to register: %d", ret); | |
251 | + pr_err("Failed to register: %d\n", ret); | |
252 | 252 | return ret; |
253 | 253 | } |
254 | 254 |
fs/cachefiles/daemon.c
... | ... | @@ -315,7 +315,7 @@ |
315 | 315 | static int cachefiles_daemon_range_error(struct cachefiles_cache *cache, |
316 | 316 | char *args) |
317 | 317 | { |
318 | - pr_err("Free space limits must be in range 0%%<=stop<cull<run<100%%"); | |
318 | + pr_err("Free space limits must be in range 0%%<=stop<cull<run<100%%\n"); | |
319 | 319 | |
320 | 320 | return -EINVAL; |
321 | 321 | } |
322 | 322 | |
... | ... | @@ -475,12 +475,12 @@ |
475 | 475 | _enter(",%s", args); |
476 | 476 | |
477 | 477 | if (!*args) { |
478 | - pr_err("Empty directory specified"); | |
478 | + pr_err("Empty directory specified\n"); | |
479 | 479 | return -EINVAL; |
480 | 480 | } |
481 | 481 | |
482 | 482 | if (cache->rootdirname) { |
483 | - pr_err("Second cache directory specified"); | |
483 | + pr_err("Second cache directory specified\n"); | |
484 | 484 | return -EEXIST; |
485 | 485 | } |
486 | 486 | |
487 | 487 | |
... | ... | @@ -503,12 +503,12 @@ |
503 | 503 | _enter(",%s", args); |
504 | 504 | |
505 | 505 | if (!*args) { |
506 | - pr_err("Empty security context specified"); | |
506 | + pr_err("Empty security context specified\n"); | |
507 | 507 | return -EINVAL; |
508 | 508 | } |
509 | 509 | |
510 | 510 | if (cache->secctx) { |
511 | - pr_err("Second security context specified"); | |
511 | + pr_err("Second security context specified\n"); | |
512 | 512 | return -EINVAL; |
513 | 513 | } |
514 | 514 | |
... | ... | @@ -531,7 +531,7 @@ |
531 | 531 | _enter(",%s", args); |
532 | 532 | |
533 | 533 | if (!*args) { |
534 | - pr_err("Empty tag specified"); | |
534 | + pr_err("Empty tag specified\n"); | |
535 | 535 | return -EINVAL; |
536 | 536 | } |
537 | 537 | |
538 | 538 | |
... | ... | @@ -562,12 +562,12 @@ |
562 | 562 | goto inval; |
563 | 563 | |
564 | 564 | if (!test_bit(CACHEFILES_READY, &cache->flags)) { |
565 | - pr_err("cull applied to unready cache"); | |
565 | + pr_err("cull applied to unready cache\n"); | |
566 | 566 | return -EIO; |
567 | 567 | } |
568 | 568 | |
569 | 569 | if (test_bit(CACHEFILES_DEAD, &cache->flags)) { |
570 | - pr_err("cull applied to dead cache"); | |
570 | + pr_err("cull applied to dead cache\n"); | |
571 | 571 | return -EIO; |
572 | 572 | } |
573 | 573 | |
574 | 574 | |
... | ... | @@ -587,11 +587,11 @@ |
587 | 587 | |
588 | 588 | notdir: |
589 | 589 | path_put(&path); |
590 | - pr_err("cull command requires dirfd to be a directory"); | |
590 | + pr_err("cull command requires dirfd to be a directory\n"); | |
591 | 591 | return -ENOTDIR; |
592 | 592 | |
593 | 593 | inval: |
594 | - pr_err("cull command requires dirfd and filename"); | |
594 | + pr_err("cull command requires dirfd and filename\n"); | |
595 | 595 | return -EINVAL; |
596 | 596 | } |
597 | 597 | |
... | ... | @@ -614,7 +614,7 @@ |
614 | 614 | return 0; |
615 | 615 | |
616 | 616 | inval: |
617 | - pr_err("debug command requires mask"); | |
617 | + pr_err("debug command requires mask\n"); | |
618 | 618 | return -EINVAL; |
619 | 619 | } |
620 | 620 | |
621 | 621 | |
... | ... | @@ -634,12 +634,12 @@ |
634 | 634 | goto inval; |
635 | 635 | |
636 | 636 | if (!test_bit(CACHEFILES_READY, &cache->flags)) { |
637 | - pr_err("inuse applied to unready cache"); | |
637 | + pr_err("inuse applied to unready cache\n"); | |
638 | 638 | return -EIO; |
639 | 639 | } |
640 | 640 | |
641 | 641 | if (test_bit(CACHEFILES_DEAD, &cache->flags)) { |
642 | - pr_err("inuse applied to dead cache"); | |
642 | + pr_err("inuse applied to dead cache\n"); | |
643 | 643 | return -EIO; |
644 | 644 | } |
645 | 645 | |
646 | 646 | |
... | ... | @@ -659,11 +659,11 @@ |
659 | 659 | |
660 | 660 | notdir: |
661 | 661 | path_put(&path); |
662 | - pr_err("inuse command requires dirfd to be a directory"); | |
662 | + pr_err("inuse command requires dirfd to be a directory\n"); | |
663 | 663 | return -ENOTDIR; |
664 | 664 | |
665 | 665 | inval: |
666 | - pr_err("inuse command requires dirfd and filename"); | |
666 | + pr_err("inuse command requires dirfd and filename\n"); | |
667 | 667 | return -EINVAL; |
668 | 668 | } |
669 | 669 |
fs/cachefiles/internal.h
... | ... | @@ -255,7 +255,7 @@ |
255 | 255 | |
256 | 256 | #define cachefiles_io_error(___cache, FMT, ...) \ |
257 | 257 | do { \ |
258 | - pr_err("I/O Error: " FMT, ##__VA_ARGS__); \ | |
258 | + pr_err("I/O Error: " FMT"\n", ##__VA_ARGS__); \ | |
259 | 259 | fscache_io_error(&(___cache)->cache); \ |
260 | 260 | set_bit(CACHEFILES_DEAD, &(___cache)->flags); \ |
261 | 261 | } while (0) |
fs/cachefiles/main.c
fs/cachefiles/namei.c
... | ... | @@ -543,7 +543,7 @@ |
543 | 543 | next, next->d_inode, next->d_inode->i_ino); |
544 | 544 | |
545 | 545 | } else if (!S_ISDIR(next->d_inode->i_mode)) { |
546 | - pr_err("inode %lu is not a directory", | |
546 | + pr_err("inode %lu is not a directory\n", | |
547 | 547 | next->d_inode->i_ino); |
548 | 548 | ret = -ENOBUFS; |
549 | 549 | goto error; |
... | ... | @@ -574,7 +574,7 @@ |
574 | 574 | } else if (!S_ISDIR(next->d_inode->i_mode) && |
575 | 575 | !S_ISREG(next->d_inode->i_mode) |
576 | 576 | ) { |
577 | - pr_err("inode %lu is not a file or directory", | |
577 | + pr_err("inode %lu is not a file or directory\n", | |
578 | 578 | next->d_inode->i_ino); |
579 | 579 | ret = -ENOBUFS; |
580 | 580 | goto error; |
... | ... | @@ -768,7 +768,7 @@ |
768 | 768 | ASSERT(subdir->d_inode); |
769 | 769 | |
770 | 770 | if (!S_ISDIR(subdir->d_inode->i_mode)) { |
771 | - pr_err("%s is not a directory", dirname); | |
771 | + pr_err("%s is not a directory\n", dirname); | |
772 | 772 | ret = -EIO; |
773 | 773 | goto check_error; |
774 | 774 | } |
775 | 775 | |
... | ... | @@ -796,13 +796,13 @@ |
796 | 796 | mkdir_error: |
797 | 797 | mutex_unlock(&dir->d_inode->i_mutex); |
798 | 798 | dput(subdir); |
799 | - pr_err("mkdir %s failed with error %d", dirname, ret); | |
799 | + pr_err("mkdir %s failed with error %d\n", dirname, ret); | |
800 | 800 | return ERR_PTR(ret); |
801 | 801 | |
802 | 802 | lookup_error: |
803 | 803 | mutex_unlock(&dir->d_inode->i_mutex); |
804 | 804 | ret = PTR_ERR(subdir); |
805 | - pr_err("Lookup %s failed with error %d", dirname, ret); | |
805 | + pr_err("Lookup %s failed with error %d\n", dirname, ret); | |
806 | 806 | return ERR_PTR(ret); |
807 | 807 | |
808 | 808 | nomem_d_alloc: |
... | ... | @@ -892,7 +892,7 @@ |
892 | 892 | if (ret == -EIO) { |
893 | 893 | cachefiles_io_error(cache, "Lookup failed"); |
894 | 894 | } else if (ret != -ENOMEM) { |
895 | - pr_err("Internal error: %d", ret); | |
895 | + pr_err("Internal error: %d\n", ret); | |
896 | 896 | ret = -EIO; |
897 | 897 | } |
898 | 898 | |
... | ... | @@ -951,7 +951,7 @@ |
951 | 951 | } |
952 | 952 | |
953 | 953 | if (ret != -ENOMEM) { |
954 | - pr_err("Internal error: %d", ret); | |
954 | + pr_err("Internal error: %d\n", ret); | |
955 | 955 | ret = -EIO; |
956 | 956 | } |
957 | 957 |
fs/cachefiles/xattr.c
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | } |
52 | 52 | |
53 | 53 | if (ret != -EEXIST) { |
54 | - pr_err("Can't set xattr on %*.*s [%lu] (err %d)", | |
54 | + pr_err("Can't set xattr on %*.*s [%lu] (err %d)\n", | |
55 | 55 | dentry->d_name.len, dentry->d_name.len, |
56 | 56 | dentry->d_name.name, dentry->d_inode->i_ino, |
57 | 57 | -ret); |
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | if (ret == -ERANGE) |
65 | 65 | goto bad_type_length; |
66 | 66 | |
67 | - pr_err("Can't read xattr on %*.*s [%lu] (err %d)", | |
67 | + pr_err("Can't read xattr on %*.*s [%lu] (err %d)\n", | |
68 | 68 | dentry->d_name.len, dentry->d_name.len, |
69 | 69 | dentry->d_name.name, dentry->d_inode->i_ino, |
70 | 70 | -ret); |
71 | 71 | |
... | ... | @@ -85,14 +85,14 @@ |
85 | 85 | return ret; |
86 | 86 | |
87 | 87 | bad_type_length: |
88 | - pr_err("Cache object %lu type xattr length incorrect", | |
88 | + pr_err("Cache object %lu type xattr length incorrect\n", | |
89 | 89 | dentry->d_inode->i_ino); |
90 | 90 | ret = -EIO; |
91 | 91 | goto error; |
92 | 92 | |
93 | 93 | bad_type: |
94 | 94 | xtype[2] = 0; |
95 | - pr_err("Cache object %*.*s [%lu] type %s not %s", | |
95 | + pr_err("Cache object %*.*s [%lu] type %s not %s\n", | |
96 | 96 | dentry->d_name.len, dentry->d_name.len, |
97 | 97 | dentry->d_name.name, dentry->d_inode->i_ino, |
98 | 98 | xtype, type); |
... | ... | @@ -293,7 +293,7 @@ |
293 | 293 | return ret; |
294 | 294 | |
295 | 295 | bad_type_length: |
296 | - pr_err("Cache object %lu xattr length incorrect", | |
296 | + pr_err("Cache object %lu xattr length incorrect\n", | |
297 | 297 | dentry->d_inode->i_ino); |
298 | 298 | ret = -EIO; |
299 | 299 | goto error; |