aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cachefiles/daemon.c')
-rw-r--r--fs/cachefiles/daemon.c31
1 files changed, 15 insertions, 16 deletions
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,
315static int cachefiles_daemon_range_error(struct cachefiles_cache *cache, 315static 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
589notdir: 588notdir:
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
594inval: 593inval:
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
617inval: 616inval:
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
661notdir: 660notdir:
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
666inval: 665inval:
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