summaryrefslogtreecommitdiff
path: root/fs/erofs/inode.c
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2019-09-04 10:09:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-05 20:10:09 +0200
commit4f761fa253b49f657de7ef6f695a124e08e56c3a (patch)
tree84d1dc58a8c8f20a77bfe9994fbf3b08b363f333 /fs/erofs/inode.c
parent84947eb603719f87ec91f0ba23126e40de7a268a (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/inode.c')
-rw-r--r--fs/erofs/inode.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index 5a6d3282fefb..a0cec3c754cd 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -22,8 +22,8 @@ static int erofs_read_inode(struct inode *inode, void *data)
vi->datalayout = erofs_inode_datalayout(ifmt);
if (vi->datalayout >= EROFS_INODE_DATALAYOUT_MAX) {
- errln("unsupported datalayout %u of nid %llu",
- vi->datalayout, vi->nid);
+ erofs_err(inode->i_sb, "unsupported datalayout %u of nid %llu",
+ vi->datalayout, vi->nid);
DBG_BUGON(1);
return -EOPNOTSUPP;
}
@@ -108,8 +108,9 @@ static int erofs_read_inode(struct inode *inode, void *data)
nblks = le32_to_cpu(dic->i_u.compressed_blocks);
break;
default:
- errln("unsupported on-disk inode version %u of nid %llu",
- erofs_inode_version(ifmt), vi->nid);
+ erofs_err(inode->i_sb,
+ "unsupported on-disk inode version %u of nid %llu",
+ erofs_inode_version(ifmt), vi->nid);
DBG_BUGON(1);
return -EOPNOTSUPP;
}
@@ -122,7 +123,8 @@ static int erofs_read_inode(struct inode *inode, void *data)
return 0;
bogusimode:
- errln("bogus i_mode (%o) @ nid %llu", inode->i_mode, vi->nid);
+ erofs_err(inode->i_sb, "bogus i_mode (%o) @ nid %llu",
+ inode->i_mode, vi->nid);
DBG_BUGON(1);
return -EFSCORRUPTED;
}
@@ -148,8 +150,9 @@ static int erofs_fill_symlink(struct inode *inode, void *data,
/* inline symlink data shouldn't cross page boundary as well */
if (m_pofs + inode->i_size > PAGE_SIZE) {
kfree(lnk);
- errln("inline data cross block boundary @ nid %llu",
- vi->nid);
+ erofs_err(inode->i_sb,
+ "inline data cross block boundary @ nid %llu",
+ vi->nid);
DBG_BUGON(1);
return -EFSCORRUPTED;
}
@@ -164,7 +167,7 @@ static int erofs_fill_symlink(struct inode *inode, void *data,
static int erofs_fill_inode(struct inode *inode, int isdir)
{
- struct erofs_sb_info *sbi = EROFS_SB(inode->i_sb);
+ struct super_block *sb = inode->i_sb;
struct erofs_inode *vi = EROFS_I(inode);
struct page *page;
void *data;
@@ -174,18 +177,18 @@ static int erofs_fill_inode(struct inode *inode, int isdir)
erofs_off_t inode_loc;
trace_erofs_fill_inode(inode, isdir);
- inode_loc = iloc(sbi, vi->nid);
+ inode_loc = iloc(EROFS_SB(sb), vi->nid);
blkaddr = erofs_blknr(inode_loc);
ofs = erofs_blkoff(inode_loc);
- debugln("%s, reading inode nid %llu at %u of blkaddr %u",
- __func__, vi->nid, ofs, blkaddr);
+ erofs_dbg("%s, reading inode nid %llu at %u of blkaddr %u",
+ __func__, vi->nid, ofs, blkaddr);
- page = erofs_get_meta_page(inode->i_sb, blkaddr);
+ page = erofs_get_meta_page(sb, blkaddr);
if (IS_ERR(page)) {
- errln("failed to get inode (nid: %llu) page, err %ld",
- vi->nid, PTR_ERR(page));
+ erofs_err(sb, "failed to get inode (nid: %llu) page, err %ld",
+ vi->nid, PTR_ERR(page));
return PTR_ERR(page);
}