diff options
Diffstat (limited to 'fs/cachefiles/namei.c')
-rw-r--r-- | fs/cachefiles/namei.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 5bf2b41e66d3..dad7d9542a24 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
@@ -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 | pr_err("inode %lu is not a directory", | 546 | pr_err("inode %lu is not a directory\n", |
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 | pr_err("inode %lu is not a file or directory", | 577 | pr_err("inode %lu is not a file or directory\n", |
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 | pr_err("%s is not a directory", dirname); | 771 | pr_err("%s is not a directory\n", dirname); |
772 | ret = -EIO; | 772 | ret = -EIO; |
773 | goto check_error; | 773 | goto check_error; |
774 | } | 774 | } |
@@ -779,7 +779,8 @@ struct dentry *cachefiles_get_directory(struct cachefiles_cache *cache, | |||
779 | !subdir->d_inode->i_op->lookup || | 779 | !subdir->d_inode->i_op->lookup || |
780 | !subdir->d_inode->i_op->mkdir || | 780 | !subdir->d_inode->i_op->mkdir || |
781 | !subdir->d_inode->i_op->create || | 781 | !subdir->d_inode->i_op->create || |
782 | !subdir->d_inode->i_op->rename || | 782 | (!subdir->d_inode->i_op->rename && |
783 | !subdir->d_inode->i_op->rename2) || | ||
783 | !subdir->d_inode->i_op->rmdir || | 784 | !subdir->d_inode->i_op->rmdir || |
784 | !subdir->d_inode->i_op->unlink) | 785 | !subdir->d_inode->i_op->unlink) |
785 | goto check_error; | 786 | goto check_error; |
@@ -795,13 +796,13 @@ check_error: | |||
795 | mkdir_error: | 796 | mkdir_error: |
796 | mutex_unlock(&dir->d_inode->i_mutex); | 797 | mutex_unlock(&dir->d_inode->i_mutex); |
797 | dput(subdir); | 798 | dput(subdir); |
798 | pr_err("mkdir %s failed with error %d", dirname, ret); | 799 | pr_err("mkdir %s failed with error %d\n", dirname, ret); |
799 | return ERR_PTR(ret); | 800 | return ERR_PTR(ret); |
800 | 801 | ||
801 | lookup_error: | 802 | lookup_error: |
802 | mutex_unlock(&dir->d_inode->i_mutex); | 803 | mutex_unlock(&dir->d_inode->i_mutex); |
803 | ret = PTR_ERR(subdir); | 804 | ret = PTR_ERR(subdir); |
804 | pr_err("Lookup %s failed with error %d", dirname, ret); | 805 | pr_err("Lookup %s failed with error %d\n", dirname, ret); |
805 | return ERR_PTR(ret); | 806 | return ERR_PTR(ret); |
806 | 807 | ||
807 | nomem_d_alloc: | 808 | nomem_d_alloc: |
@@ -891,7 +892,7 @@ lookup_error: | |||
891 | if (ret == -EIO) { | 892 | if (ret == -EIO) { |
892 | cachefiles_io_error(cache, "Lookup failed"); | 893 | cachefiles_io_error(cache, "Lookup failed"); |
893 | } else if (ret != -ENOMEM) { | 894 | } else if (ret != -ENOMEM) { |
894 | pr_err("Internal error: %d", ret); | 895 | pr_err("Internal error: %d\n", ret); |
895 | ret = -EIO; | 896 | ret = -EIO; |
896 | } | 897 | } |
897 | 898 | ||
@@ -950,7 +951,7 @@ error: | |||
950 | } | 951 | } |
951 | 952 | ||
952 | if (ret != -ENOMEM) { | 953 | if (ret != -ENOMEM) { |
953 | pr_err("Internal error: %d", ret); | 954 | pr_err("Internal error: %d\n", ret); |
954 | ret = -EIO; | 955 | ret = -EIO; |
955 | } | 956 | } |
956 | 957 | ||