aboutsummaryrefslogtreecommitdiffstats
path: root/fs/efs/dir.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-04 19:12:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:20 -0400
commitf403d1dbac6d1ef28f553f3996d5bb5cea90ce15 (patch)
tree08e96ff86dcaf465b8e2ce4c27158b211f789188 /fs/efs/dir.c
parent179b87fb186b524ec75a5d54c0d7f25e8d559415 (diff)
fs/efs: add pr_fmt / use __func__
Also uniformize function arguments. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/efs/dir.c')
-rw-r--r--fs/efs/dir.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/efs/dir.c b/fs/efs/dir.c
index 46a9a607e4ac..7f970315b6c3 100644
--- a/fs/efs/dir.c
+++ b/fs/efs/dir.c
@@ -26,7 +26,8 @@ static int efs_readdir(struct file *file, struct dir_context *ctx)
26 int slot; 26 int slot;
27 27
28 if (inode->i_size & (EFS_DIRBSIZE-1)) 28 if (inode->i_size & (EFS_DIRBSIZE-1))
29 pr_warn("EFS: WARNING: readdir(): directory size not a multiple of EFS_DIRBSIZE\n"); 29 pr_warn("%s(): directory size not a multiple of EFS_DIRBSIZE\n",
30 __func__);
30 31
31 /* work out where this entry can be found */ 32 /* work out where this entry can be found */
32 block = ctx->pos >> EFS_DIRBSIZE_BITS; 33 block = ctx->pos >> EFS_DIRBSIZE_BITS;
@@ -43,14 +44,15 @@ static int efs_readdir(struct file *file, struct dir_context *ctx)
43 bh = sb_bread(inode->i_sb, efs_bmap(inode, block)); 44 bh = sb_bread(inode->i_sb, efs_bmap(inode, block));
44 45
45 if (!bh) { 46 if (!bh) {
46 pr_err("EFS: readdir(): failed to read dir block %d\n", block); 47 pr_err("%s(): failed to read dir block %d\n",
48 __func__, block);
47 break; 49 break;
48 } 50 }
49 51
50 dirblock = (struct efs_dir *) bh->b_data; 52 dirblock = (struct efs_dir *) bh->b_data;
51 53
52 if (be16_to_cpu(dirblock->magic) != EFS_DIRBLK_MAGIC) { 54 if (be16_to_cpu(dirblock->magic) != EFS_DIRBLK_MAGIC) {
53 pr_err("EFS: readdir(): invalid directory block\n"); 55 pr_err("%s(): invalid directory block\n", __func__);
54 brelse(bh); 56 brelse(bh);
55 break; 57 break;
56 } 58 }
@@ -80,7 +82,8 @@ static int efs_readdir(struct file *file, struct dir_context *ctx)
80 82
81 /* sanity check */ 83 /* sanity check */
82 if (nameptr - (char *) dirblock + namelen > EFS_DIRBSIZE) { 84 if (nameptr - (char *) dirblock + namelen > EFS_DIRBSIZE) {
83 pr_warn("EFS: directory entry %d exceeds directory block\n", slot); 85 pr_warn("directory entry %d exceeds directory block\n",
86 slot);
84 continue; 87 continue;
85 } 88 }
86 89