diff options
author | Gao Xiang <gaoxiang25@huawei.com> | 2019-09-04 10:09:09 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-05 20:10:09 +0200 |
commit | 4f761fa253b49f657de7ef6f695a124e08e56c3a (patch) | |
tree | 84d1dc58a8c8f20a77bfe9994fbf3b08b363f333 /fs/erofs/dir.c | |
parent | 84947eb603719f87ec91f0ba23126e40de7a268a (diff) |
erofs: rename errln/infoln/debugln to erofs_{err, info, dbg}
Add prefix "erofs_" to these functions and print
sb->s_id as a prefix to erofs_{err, info} so that
the user knows which file system is affected.
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190904020912.63925-23-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/erofs/dir.c')
-rw-r--r-- | fs/erofs/dir.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c index a032c8217071..d28c623dfef9 100644 --- a/fs/erofs/dir.c +++ b/fs/erofs/dir.c @@ -16,8 +16,8 @@ static void debug_one_dentry(unsigned char d_type, const char *de_name, memcpy(dbg_namebuf, de_name, de_namelen); dbg_namebuf[de_namelen] = '\0'; - debugln("found dirent %s de_len %u d_type %d", dbg_namebuf, - de_namelen, d_type); + erofs_dbg("found dirent %s de_len %u d_type %d", dbg_namebuf, + de_namelen, d_type); #endif } @@ -47,7 +47,8 @@ static int erofs_fill_dentries(struct inode *dir, struct dir_context *ctx, /* a corrupted entry is found */ if (nameoff + de_namelen > maxsize || de_namelen > EROFS_NAME_LEN) { - errln("bogus dirent @ nid %llu", EROFS_I(dir)->nid); + erofs_err(dir->i_sb, "bogus dirent @ nid %llu", + EROFS_I(dir)->nid); DBG_BUGON(1); return -EFSCORRUPTED; } @@ -84,8 +85,9 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) err = -ENOMEM; break; } else if (IS_ERR(dentry_page)) { - errln("fail to readdir of logical block %u of nid %llu", - i, EROFS_I(dir)->nid); + erofs_err(dir->i_sb, + "fail to readdir of logical block %u of nid %llu", + i, EROFS_I(dir)->nid); err = -EFSCORRUPTED; break; } @@ -96,8 +98,9 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) if (nameoff < sizeof(struct erofs_dirent) || nameoff >= PAGE_SIZE) { - errln("%s, invalid de[0].nameoff %u @ nid %llu", - __func__, nameoff, EROFS_I(dir)->nid); + erofs_err(dir->i_sb, + "invalid de[0].nameoff %u @ nid %llu", + nameoff, EROFS_I(dir)->nid); err = -EFSCORRUPTED; goto skip_this; } |