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/namei.c | |
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/namei.c')
-rw-r--r-- | fs/cachefiles/namei.c | 24 |
1 files changed, 12 insertions, 12 deletions
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 | ||