diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-06 17:37:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:14 -0400 |
commit | 4e1eb88305135248ad0e927449e457df95d8d9b3 (patch) | |
tree | 5751bb25a6bec21e9863d8f554cb2ae55e99160c /fs/cachefiles/namei.c | |
parent | ef74885353e0ee4d884604148628df3369c76719 (diff) |
FS/CACHEFILES: convert printk to pr_foo()
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 | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index c0a681705104..18e0d8ee3542 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
@@ -35,22 +35,21 @@ void __cachefiles_printk_object(struct cachefiles_object *object, | |||
35 | struct fscache_cookie *cookie; | 35 | struct fscache_cookie *cookie; |
36 | unsigned keylen, loop; | 36 | unsigned keylen, loop; |
37 | 37 | ||
38 | printk(KERN_ERR "%sobject: OBJ%x\n", | 38 | pr_err("%sobject: OBJ%x\n", prefix, object->fscache.debug_id); |
39 | prefix, object->fscache.debug_id); | 39 | pr_err("%sobjstate=%s fl=%lx wbusy=%x ev=%lx[%lx]\n", |
40 | printk(KERN_ERR "%sobjstate=%s fl=%lx wbusy=%x ev=%lx[%lx]\n", | ||
41 | prefix, object->fscache.state->name, | 40 | prefix, object->fscache.state->name, |
42 | object->fscache.flags, work_busy(&object->fscache.work), | 41 | object->fscache.flags, work_busy(&object->fscache.work), |
43 | object->fscache.events, object->fscache.event_mask); | 42 | object->fscache.events, object->fscache.event_mask); |
44 | printk(KERN_ERR "%sops=%u inp=%u exc=%u\n", | 43 | pr_err("%sops=%u inp=%u exc=%u\n", |
45 | prefix, object->fscache.n_ops, object->fscache.n_in_progress, | 44 | prefix, object->fscache.n_ops, object->fscache.n_in_progress, |
46 | object->fscache.n_exclusive); | 45 | object->fscache.n_exclusive); |
47 | printk(KERN_ERR "%sparent=%p\n", | 46 | pr_err("%sparent=%p\n", |
48 | prefix, object->fscache.parent); | 47 | prefix, object->fscache.parent); |
49 | 48 | ||
50 | spin_lock(&object->fscache.lock); | 49 | spin_lock(&object->fscache.lock); |
51 | cookie = object->fscache.cookie; | 50 | cookie = object->fscache.cookie; |
52 | if (cookie) { | 51 | if (cookie) { |
53 | printk(KERN_ERR "%scookie=%p [pr=%p nd=%p fl=%lx]\n", | 52 | pr_err("%scookie=%p [pr=%p nd=%p fl=%lx]\n", |
54 | prefix, | 53 | prefix, |
55 | object->fscache.cookie, | 54 | object->fscache.cookie, |
56 | object->fscache.cookie->parent, | 55 | object->fscache.cookie->parent, |
@@ -62,16 +61,16 @@ void __cachefiles_printk_object(struct cachefiles_object *object, | |||
62 | else | 61 | else |
63 | keylen = 0; | 62 | keylen = 0; |
64 | } else { | 63 | } else { |
65 | printk(KERN_ERR "%scookie=NULL\n", prefix); | 64 | pr_err("%scookie=NULL\n", prefix); |
66 | keylen = 0; | 65 | keylen = 0; |
67 | } | 66 | } |
68 | spin_unlock(&object->fscache.lock); | 67 | spin_unlock(&object->fscache.lock); |
69 | 68 | ||
70 | if (keylen) { | 69 | if (keylen) { |
71 | printk(KERN_ERR "%skey=[%u] '", prefix, keylen); | 70 | pr_err("%skey=[%u] '", prefix, keylen); |
72 | for (loop = 0; loop < keylen; loop++) | 71 | for (loop = 0; loop < keylen; loop++) |
73 | printk("%02x", keybuf[loop]); | 72 | pr_cont("%02x", keybuf[loop]); |
74 | printk("'\n"); | 73 | pr_cont("'\n"); |
75 | } | 74 | } |
76 | } | 75 | } |
77 | 76 | ||
@@ -131,13 +130,11 @@ found_dentry: | |||
131 | dentry); | 130 | dentry); |
132 | 131 | ||
133 | if (fscache_object_is_live(&object->fscache)) { | 132 | if (fscache_object_is_live(&object->fscache)) { |
134 | printk(KERN_ERR "\n"); | 133 | pr_err("\n"); |
135 | printk(KERN_ERR "CacheFiles: Error:" | 134 | pr_err("CacheFiles: Error: Can't preemptively bury live object\n"); |
136 | " Can't preemptively bury live object\n"); | ||
137 | cachefiles_printk_object(object, NULL); | 135 | cachefiles_printk_object(object, NULL); |
138 | } else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { | 136 | } else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { |
139 | printk(KERN_ERR "CacheFiles: Error:" | 137 | pr_err("CacheFiles: Error: Object already preemptively buried\n"); |
140 | " Object already preemptively buried\n"); | ||
141 | } | 138 | } |
142 | 139 | ||
143 | write_unlock(&cache->active_lock); | 140 | write_unlock(&cache->active_lock); |
@@ -160,7 +157,7 @@ try_again: | |||
160 | write_lock(&cache->active_lock); | 157 | write_lock(&cache->active_lock); |
161 | 158 | ||
162 | if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { | 159 | if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { |
163 | printk(KERN_ERR "CacheFiles: Error: Object already active\n"); | 160 | pr_err("CacheFiles: Error: Object already active\n"); |
164 | cachefiles_printk_object(object, NULL); | 161 | cachefiles_printk_object(object, NULL); |
165 | BUG(); | 162 | BUG(); |
166 | } | 163 | } |
@@ -193,9 +190,8 @@ try_again: | |||
193 | * need to wait for it to be destroyed */ | 190 | * need to wait for it to be destroyed */ |
194 | wait_for_old_object: | 191 | wait_for_old_object: |
195 | if (fscache_object_is_live(&object->fscache)) { | 192 | if (fscache_object_is_live(&object->fscache)) { |
196 | printk(KERN_ERR "\n"); | 193 | pr_err("\n"); |
197 | printk(KERN_ERR "CacheFiles: Error:" | 194 | pr_err("CacheFiles: Error: Unexpected object collision\n"); |
198 | " Unexpected object collision\n"); | ||
199 | cachefiles_printk_object(object, xobject); | 195 | cachefiles_printk_object(object, xobject); |
200 | BUG(); | 196 | BUG(); |
201 | } | 197 | } |
@@ -241,9 +237,8 @@ wait_for_old_object: | |||
241 | } | 237 | } |
242 | 238 | ||
243 | if (timeout <= 0) { | 239 | if (timeout <= 0) { |
244 | printk(KERN_ERR "\n"); | 240 | pr_err("\n"); |
245 | printk(KERN_ERR "CacheFiles: Error: Overlong" | 241 | pr_err("CacheFiles: Error: Overlong wait for old active object to go away\n"); |
246 | " wait for old active object to go away\n"); | ||
247 | cachefiles_printk_object(object, xobject); | 242 | cachefiles_printk_object(object, xobject); |
248 | goto requeue; | 243 | goto requeue; |
249 | } | 244 | } |