aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda/dir.c')
-rw-r--r--fs/coda/dir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index cf2735c2ba6f..cd8a63238b11 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -453,23 +453,23 @@ 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 pr_err("coda readdir: read dir %s failed %d\n", 456 pr_err("%s: read dir %s failed %d\n",
457 coda_f2s(&cii->c_fid), ret); 457 __func__, coda_f2s(&cii->c_fid), ret);
458 break; 458 break;
459 } 459 }
460 if (ret == 0) break; /* end of directory file reached */ 460 if (ret == 0) break; /* end of directory file reached */
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 pr_err("coda readdir: short read on %s\n", 464 pr_err("%s: short read on %s\n",
465 coda_f2s(&cii->c_fid)); 465 __func__, 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 pr_err("coda readdir: invalid dir %s\n", 471 pr_err("%s: invalid dir %s\n",
472 coda_f2s(&cii->c_fid)); 472 __func__, coda_f2s(&cii->c_fid));
473 ret = -EBADF; 473 ret = -EBADF;
474 break; 474 break;
475 } 475 }