diff options
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/cnode.c | 4 | ||||
-rw-r--r-- | fs/coda/coda_linux.h | 2 | ||||
-rw-r--r-- | fs/coda/dir.c | 12 | ||||
-rw-r--r-- | fs/coda/inode.c | 29 | ||||
-rw-r--r-- | fs/coda/psdev.c | 34 | ||||
-rw-r--r-- | fs/coda/upcall.c | 14 |
6 files changed, 48 insertions, 47 deletions
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 911cf30d057d..4bb74b3d3901 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c | |||
@@ -101,7 +101,7 @@ struct inode *coda_cnode_make(struct CodaFid *fid, struct super_block *sb) | |||
101 | 101 | ||
102 | inode = coda_iget(sb, fid, &attr); | 102 | inode = coda_iget(sb, fid, &attr); |
103 | if (IS_ERR(inode)) | 103 | if (IS_ERR(inode)) |
104 | printk("coda_cnode_make: coda_iget failed\n"); | 104 | pr_warn("coda_cnode_make: coda_iget failed\n"); |
105 | return inode; | 105 | return inode; |
106 | } | 106 | } |
107 | 107 | ||
@@ -137,7 +137,7 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) | |||
137 | unsigned long hash = coda_f2i(fid); | 137 | unsigned long hash = coda_f2i(fid); |
138 | 138 | ||
139 | if ( !sb ) { | 139 | if ( !sb ) { |
140 | printk("coda_fid_to_inode: no sb!\n"); | 140 | pr_warn("coda_fid_to_inode: no sb!\n"); |
141 | return NULL; | 141 | return NULL; |
142 | } | 142 | } |
143 | 143 | ||
diff --git a/fs/coda/coda_linux.h b/fs/coda/coda_linux.h index e7550cb9fb74..a3bf7a873ad2 100644 --- a/fs/coda/coda_linux.h +++ b/fs/coda/coda_linux.h | |||
@@ -63,7 +63,7 @@ void coda_sysctl_clean(void); | |||
63 | else \ | 63 | else \ |
64 | ptr = (cast)vzalloc((unsigned long) size); \ | 64 | ptr = (cast)vzalloc((unsigned long) size); \ |
65 | if (!ptr) \ | 65 | if (!ptr) \ |
66 | printk("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \ | 66 | pr_warn("kernel malloc returns 0 at %s:%d\n", __FILE__, __LINE__); \ |
67 | } while (0) | 67 | } while (0) |
68 | 68 | ||
69 | 69 | ||
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 5efbb5ee0adc..bdd34df79c88 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
@@ -102,7 +102,7 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, unsig | |||
102 | int type = 0; | 102 | int type = 0; |
103 | 103 | ||
104 | if (length > CODA_MAXNAMLEN) { | 104 | if (length > CODA_MAXNAMLEN) { |
105 | printk(KERN_ERR "name too long: lookup, %s (%*s)\n", | 105 | pr_err("name too long: lookup, %s (%*s)\n", |
106 | coda_i2s(dir), (int)length, name); | 106 | coda_i2s(dir), (int)length, name); |
107 | return ERR_PTR(-ENAMETOOLONG); | 107 | return ERR_PTR(-ENAMETOOLONG); |
108 | } | 108 | } |
@@ -453,7 +453,7 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) | |||
453 | ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir, | 453 | ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir, |
454 | sizeof(*vdir)); | 454 | sizeof(*vdir)); |
455 | if (ret < 0) { | 455 | if (ret < 0) { |
456 | printk(KERN_ERR "coda readdir: read dir %s failed %d\n", | 456 | pr_err("coda readdir: read dir %s failed %d\n", |
457 | coda_f2s(&cii->c_fid), ret); | 457 | coda_f2s(&cii->c_fid), ret); |
458 | break; | 458 | break; |
459 | } | 459 | } |
@@ -461,14 +461,14 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) | |||
461 | 461 | ||
462 | /* catch truncated reads */ | 462 | /* catch truncated reads */ |
463 | if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) { | 463 | if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) { |
464 | printk(KERN_ERR "coda readdir: short read on %s\n", | 464 | pr_err("coda readdir: short read on %s\n", |
465 | coda_f2s(&cii->c_fid)); | 465 | coda_f2s(&cii->c_fid)); |
466 | ret = -EBADF; | 466 | ret = -EBADF; |
467 | break; | 467 | break; |
468 | } | 468 | } |
469 | /* validate whether the directory file actually makes sense */ | 469 | /* validate whether the directory file actually makes sense */ |
470 | if (vdir->d_reclen < vdir_size + vdir->d_namlen) { | 470 | if (vdir->d_reclen < vdir_size + vdir->d_namlen) { |
471 | printk(KERN_ERR "coda readdir: invalid dir %s\n", | 471 | pr_err("coda readdir: invalid dir %s\n", |
472 | coda_f2s(&cii->c_fid)); | 472 | coda_f2s(&cii->c_fid)); |
473 | ret = -EBADF; | 473 | ret = -EBADF; |
474 | break; | 474 | break; |
@@ -589,8 +589,8 @@ int coda_revalidate_inode(struct inode *inode) | |||
589 | coda_vattr_to_iattr(inode, &attr); | 589 | coda_vattr_to_iattr(inode, &attr); |
590 | 590 | ||
591 | if ((old_mode & S_IFMT) != (inode->i_mode & S_IFMT)) { | 591 | if ((old_mode & S_IFMT) != (inode->i_mode & S_IFMT)) { |
592 | printk("Coda: inode %ld, fid %s changed type!\n", | 592 | pr_warn("Coda: inode %ld, fid %s changed type!\n", |
593 | inode->i_ino, coda_f2s(&(cii->c_fid))); | 593 | inode->i_ino, coda_f2s(&(cii->c_fid))); |
594 | } | 594 | } |
595 | 595 | ||
596 | /* the following can happen when a local fid is replaced | 596 | /* the following can happen when a local fid is replaced |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index d9c7751f10ac..b87d49fea623 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -119,12 +119,12 @@ static int get_device_index(struct coda_mount_data *data) | |||
119 | int idx; | 119 | int idx; |
120 | 120 | ||
121 | if (data == NULL) { | 121 | if (data == NULL) { |
122 | printk("coda_read_super: Bad mount data\n"); | 122 | pr_warn("coda_read_super: Bad mount data\n"); |
123 | return -1; | 123 | return -1; |
124 | } | 124 | } |
125 | 125 | ||
126 | if (data->version != CODA_MOUNT_VERSION) { | 126 | if (data->version != CODA_MOUNT_VERSION) { |
127 | printk("coda_read_super: Bad mount version\n"); | 127 | pr_warn("coda_read_super: Bad mount version\n"); |
128 | return -1; | 128 | return -1; |
129 | } | 129 | } |
130 | 130 | ||
@@ -141,13 +141,13 @@ static int get_device_index(struct coda_mount_data *data) | |||
141 | fdput(f); | 141 | fdput(f); |
142 | 142 | ||
143 | if (idx < 0 || idx >= MAX_CODADEVS) { | 143 | if (idx < 0 || idx >= MAX_CODADEVS) { |
144 | printk("coda_read_super: Bad minor number\n"); | 144 | pr_warn("coda_read_super: Bad minor number\n"); |
145 | return -1; | 145 | return -1; |
146 | } | 146 | } |
147 | 147 | ||
148 | return idx; | 148 | return idx; |
149 | Ebadf: | 149 | Ebadf: |
150 | printk("coda_read_super: Bad file\n"); | 150 | pr_warn("coda_read_super: Bad file\n"); |
151 | return -1; | 151 | return -1; |
152 | } | 152 | } |
153 | 153 | ||
@@ -168,19 +168,19 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
168 | if(idx == -1) | 168 | if(idx == -1) |
169 | idx = 0; | 169 | idx = 0; |
170 | 170 | ||
171 | printk(KERN_INFO "coda_read_super: device index: %i\n", idx); | 171 | pr_info("coda_read_super: device index: %i\n", idx); |
172 | 172 | ||
173 | vc = &coda_comms[idx]; | 173 | vc = &coda_comms[idx]; |
174 | mutex_lock(&vc->vc_mutex); | 174 | mutex_lock(&vc->vc_mutex); |
175 | 175 | ||
176 | if (!vc->vc_inuse) { | 176 | if (!vc->vc_inuse) { |
177 | printk("coda_read_super: No pseudo device\n"); | 177 | pr_warn("coda_read_super: No pseudo device\n"); |
178 | error = -EINVAL; | 178 | error = -EINVAL; |
179 | goto unlock_out; | 179 | goto unlock_out; |
180 | } | 180 | } |
181 | 181 | ||
182 | if (vc->vc_sb) { | 182 | if (vc->vc_sb) { |
183 | printk("coda_read_super: Device already mounted\n"); | 183 | pr_warn("coda_read_super: Device already mounted\n"); |
184 | error = -EBUSY; | 184 | error = -EBUSY; |
185 | goto unlock_out; | 185 | goto unlock_out; |
186 | } | 186 | } |
@@ -204,22 +204,23 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
204 | /* get root fid from Venus: this needs the root inode */ | 204 | /* get root fid from Venus: this needs the root inode */ |
205 | error = venus_rootfid(sb, &fid); | 205 | error = venus_rootfid(sb, &fid); |
206 | if ( error ) { | 206 | if ( error ) { |
207 | printk("coda_read_super: coda_get_rootfid failed with %d\n", | 207 | pr_warn("coda_read_super: coda_get_rootfid failed with %d\n", |
208 | error); | 208 | error); |
209 | goto error; | 209 | goto error; |
210 | } | 210 | } |
211 | printk("coda_read_super: rootfid is %s\n", coda_f2s(&fid)); | 211 | pr_info("coda_read_super: rootfid is %s\n", coda_f2s(&fid)); |
212 | 212 | ||
213 | /* make root inode */ | 213 | /* make root inode */ |
214 | root = coda_cnode_make(&fid, sb); | 214 | root = coda_cnode_make(&fid, sb); |
215 | if (IS_ERR(root)) { | 215 | if (IS_ERR(root)) { |
216 | error = PTR_ERR(root); | 216 | error = PTR_ERR(root); |
217 | printk("Failure of coda_cnode_make for root: error %d\n", error); | 217 | pr_warn("Failure of coda_cnode_make for root: error %d\n", |
218 | error); | ||
218 | goto error; | 219 | goto error; |
219 | } | 220 | } |
220 | 221 | ||
221 | printk("coda_read_super: rootinode is %ld dev %s\n", | 222 | pr_info("coda_read_super: rootinode is %ld dev %s\n", |
222 | root->i_ino, root->i_sb->s_id); | 223 | root->i_ino, root->i_sb->s_id); |
223 | sb->s_root = d_make_root(root); | 224 | sb->s_root = d_make_root(root); |
224 | if (!sb->s_root) { | 225 | if (!sb->s_root) { |
225 | error = -EINVAL; | 226 | error = -EINVAL; |
@@ -246,7 +247,7 @@ static void coda_put_super(struct super_block *sb) | |||
246 | sb->s_fs_info = NULL; | 247 | sb->s_fs_info = NULL; |
247 | mutex_unlock(&vcp->vc_mutex); | 248 | mutex_unlock(&vcp->vc_mutex); |
248 | 249 | ||
249 | printk("Coda: Bye bye.\n"); | 250 | pr_info("Coda: Bye bye.\n"); |
250 | } | 251 | } |
251 | 252 | ||
252 | static void coda_evict_inode(struct inode *inode) | 253 | static void coda_evict_inode(struct inode *inode) |
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index ebc2bae6c289..accddf6e2718 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -114,14 +114,14 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, | |||
114 | int size = sizeof(*dcbuf); | 114 | int size = sizeof(*dcbuf); |
115 | 115 | ||
116 | if ( nbytes < sizeof(struct coda_out_hdr) ) { | 116 | if ( nbytes < sizeof(struct coda_out_hdr) ) { |
117 | printk("coda_downcall opc %d uniq %d, not enough!\n", | 117 | pr_warn("coda_downcall opc %d uniq %d, not enough!\n", |
118 | hdr.opcode, hdr.unique); | 118 | hdr.opcode, hdr.unique); |
119 | count = nbytes; | 119 | count = nbytes; |
120 | goto out; | 120 | goto out; |
121 | } | 121 | } |
122 | if ( nbytes > size ) { | 122 | if ( nbytes > size ) { |
123 | printk("Coda: downcall opc %d, uniq %d, too much!", | 123 | pr_warn("Coda: downcall opc %d, uniq %d, too much!", |
124 | hdr.opcode, hdr.unique); | 124 | hdr.opcode, hdr.unique); |
125 | nbytes = size; | 125 | nbytes = size; |
126 | } | 126 | } |
127 | CODA_ALLOC(dcbuf, union outputArgs *, nbytes); | 127 | CODA_ALLOC(dcbuf, union outputArgs *, nbytes); |
@@ -136,7 +136,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, | |||
136 | 136 | ||
137 | CODA_FREE(dcbuf, nbytes); | 137 | CODA_FREE(dcbuf, nbytes); |
138 | if (error) { | 138 | if (error) { |
139 | printk("psdev_write: coda_downcall error: %d\n", error); | 139 | pr_warn("psdev_write: coda_downcall error: %d\n", |
140 | error); | ||
140 | retval = error; | 141 | retval = error; |
141 | goto out; | 142 | goto out; |
142 | } | 143 | } |
@@ -157,7 +158,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, | |||
157 | mutex_unlock(&vcp->vc_mutex); | 158 | mutex_unlock(&vcp->vc_mutex); |
158 | 159 | ||
159 | if (!req) { | 160 | if (!req) { |
160 | printk("psdev_write: msg (%d, %d) not found\n", | 161 | pr_warn("psdev_write: msg (%d, %d) not found\n", |
161 | hdr.opcode, hdr.unique); | 162 | hdr.opcode, hdr.unique); |
162 | retval = -ESRCH; | 163 | retval = -ESRCH; |
163 | goto out; | 164 | goto out; |
@@ -165,8 +166,8 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, | |||
165 | 166 | ||
166 | /* move data into response buffer. */ | 167 | /* move data into response buffer. */ |
167 | if (req->uc_outSize < nbytes) { | 168 | if (req->uc_outSize < nbytes) { |
168 | printk("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n", | 169 | pr_warn("psdev_write: too much cnt: %d, cnt: %ld, opc: %d, uniq: %d.\n", |
169 | req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique); | 170 | req->uc_outSize, (long)nbytes, hdr.opcode, hdr.unique); |
170 | nbytes = req->uc_outSize; /* don't have more space! */ | 171 | nbytes = req->uc_outSize; /* don't have more space! */ |
171 | } | 172 | } |
172 | if (copy_from_user(req->uc_data, buf, nbytes)) { | 173 | if (copy_from_user(req->uc_data, buf, nbytes)) { |
@@ -240,7 +241,7 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf, | |||
240 | /* Move the input args into userspace */ | 241 | /* Move the input args into userspace */ |
241 | count = req->uc_inSize; | 242 | count = req->uc_inSize; |
242 | if (nbytes < req->uc_inSize) { | 243 | if (nbytes < req->uc_inSize) { |
243 | printk ("psdev_read: Venus read %ld bytes of %d in message\n", | 244 | pr_warn("psdev_read: Venus read %ld bytes of %d in message\n", |
244 | (long)nbytes, req->uc_inSize); | 245 | (long)nbytes, req->uc_inSize); |
245 | count = nbytes; | 246 | count = nbytes; |
246 | } | 247 | } |
@@ -305,7 +306,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) | |||
305 | struct upc_req *req, *tmp; | 306 | struct upc_req *req, *tmp; |
306 | 307 | ||
307 | if (!vcp || !vcp->vc_inuse ) { | 308 | if (!vcp || !vcp->vc_inuse ) { |
308 | printk("psdev_release: Not open.\n"); | 309 | pr_warn("psdev_release: Not open.\n"); |
309 | return -1; | 310 | return -1; |
310 | } | 311 | } |
311 | 312 | ||
@@ -354,8 +355,8 @@ static int init_coda_psdev(void) | |||
354 | { | 355 | { |
355 | int i, err = 0; | 356 | int i, err = 0; |
356 | if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) { | 357 | if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) { |
357 | printk(KERN_ERR "coda_psdev: unable to get major %d\n", | 358 | pr_err("coda_psdev: unable to get major %d\n", |
358 | CODA_PSDEV_MAJOR); | 359 | CODA_PSDEV_MAJOR); |
359 | return -EIO; | 360 | return -EIO; |
360 | } | 361 | } |
361 | coda_psdev_class = class_create(THIS_MODULE, "coda"); | 362 | coda_psdev_class = class_create(THIS_MODULE, "coda"); |
@@ -393,13 +394,13 @@ static int __init init_coda(void) | |||
393 | goto out2; | 394 | goto out2; |
394 | status = init_coda_psdev(); | 395 | status = init_coda_psdev(); |
395 | if ( status ) { | 396 | if ( status ) { |
396 | printk("Problem (%d) in init_coda_psdev\n", status); | 397 | pr_warn("Problem (%d) in init_coda_psdev\n", status); |
397 | goto out1; | 398 | goto out1; |
398 | } | 399 | } |
399 | 400 | ||
400 | status = register_filesystem(&coda_fs_type); | 401 | status = register_filesystem(&coda_fs_type); |
401 | if (status) { | 402 | if (status) { |
402 | printk("coda: failed to register filesystem!\n"); | 403 | pr_warn("coda: failed to register filesystem!\n"); |
403 | goto out; | 404 | goto out; |
404 | } | 405 | } |
405 | return 0; | 406 | return 0; |
@@ -420,9 +421,8 @@ static void __exit exit_coda(void) | |||
420 | int err, i; | 421 | int err, i; |
421 | 422 | ||
422 | err = unregister_filesystem(&coda_fs_type); | 423 | err = unregister_filesystem(&coda_fs_type); |
423 | if ( err != 0 ) { | 424 | if (err != 0) |
424 | printk("coda: failed to unregister filesystem\n"); | 425 | pr_warn("coda: failed to unregister filesystem\n"); |
425 | } | ||
426 | for (i = 0; i < MAX_CODADEVS; i++) | 426 | for (i = 0; i < MAX_CODADEVS; i++) |
427 | device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); | 427 | device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); |
428 | class_destroy(coda_psdev_class); | 428 | class_destroy(coda_psdev_class); |
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 3a731976dc5e..5f3b21714c59 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c | |||
@@ -508,8 +508,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, | |||
508 | inp->coda_ioctl.data = (char *)(INSIZE(ioctl)); | 508 | inp->coda_ioctl.data = (char *)(INSIZE(ioctl)); |
509 | 509 | ||
510 | /* get the data out of user space */ | 510 | /* get the data out of user space */ |
511 | if ( copy_from_user((char*)inp + (long)inp->coda_ioctl.data, | 511 | if (copy_from_user((char *)inp + (long)inp->coda_ioctl.data, |
512 | data->vi.in, data->vi.in_size) ) { | 512 | data->vi.in, data->vi.in_size)) { |
513 | error = -EINVAL; | 513 | error = -EINVAL; |
514 | goto exit; | 514 | goto exit; |
515 | } | 515 | } |
@@ -518,8 +518,8 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, | |||
518 | &outsize, inp); | 518 | &outsize, inp); |
519 | 519 | ||
520 | if (error) { | 520 | if (error) { |
521 | printk("coda_pioctl: Venus returns: %d for %s\n", | 521 | pr_warn("coda_pioctl: Venus returns: %d for %s\n", |
522 | error, coda_f2s(fid)); | 522 | error, coda_f2s(fid)); |
523 | goto exit; | 523 | goto exit; |
524 | } | 524 | } |
525 | 525 | ||
@@ -675,7 +675,7 @@ static int coda_upcall(struct venus_comm *vcp, | |||
675 | mutex_lock(&vcp->vc_mutex); | 675 | mutex_lock(&vcp->vc_mutex); |
676 | 676 | ||
677 | if (!vcp->vc_inuse) { | 677 | if (!vcp->vc_inuse) { |
678 | printk(KERN_NOTICE "coda: Venus dead, not sending upcall\n"); | 678 | pr_notice("coda: Venus dead, not sending upcall\n"); |
679 | error = -ENXIO; | 679 | error = -ENXIO; |
680 | goto exit; | 680 | goto exit; |
681 | } | 681 | } |
@@ -725,7 +725,7 @@ static int coda_upcall(struct venus_comm *vcp, | |||
725 | 725 | ||
726 | error = -EINTR; | 726 | error = -EINTR; |
727 | if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) { | 727 | if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) { |
728 | printk(KERN_WARNING "coda: Unexpected interruption.\n"); | 728 | pr_warn("coda: Unexpected interruption.\n"); |
729 | goto exit; | 729 | goto exit; |
730 | } | 730 | } |
731 | 731 | ||
@@ -735,7 +735,7 @@ static int coda_upcall(struct venus_comm *vcp, | |||
735 | 735 | ||
736 | /* Venus saw the upcall, make sure we can send interrupt signal */ | 736 | /* Venus saw the upcall, make sure we can send interrupt signal */ |
737 | if (!vcp->vc_inuse) { | 737 | if (!vcp->vc_inuse) { |
738 | printk(KERN_INFO "coda: Venus dead, not sending signal.\n"); | 738 | pr_info("coda: Venus dead, not sending signal.\n"); |
739 | goto exit; | 739 | goto exit; |
740 | } | 740 | } |
741 | 741 | ||