diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-06 17:04:05 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:10:09 +0300 |
commit | e691b391f02b2ddef1a784ea2d4cd3f46bb6a62a (patch) | |
tree | 16fe97f83500b768b79cc2f37ac757dc374888c7 /fs/bcachefs/fs.c | |
parent | 4198bf03bed27aa758de36595416beb604600912 (diff) | |
download | linux-e691b391f02b2ddef1a784ea2d4cd3f46bb6a62a.tar.xz |
bcachefs: Add logging to bch2_inode_peek() & related
Add error messages when we fail to lookup an inode, and also add a few
missing bch2_err_class() calls.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r-- | fs/bcachefs/fs.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index e1824bdffdf8..695b8bc55590 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -203,7 +203,7 @@ struct inode *bch2_vfs_inode_get(struct bch_fs *c, subvol_inum inum) if (ret) { iget_failed(&inode->v); - return ERR_PTR(ret); + return ERR_PTR(bch2_err_class(ret)); } mutex_lock(&c->vfs_inodes_lock); @@ -1000,11 +1000,16 @@ static int bch2_vfs_readdir(struct file *file, struct dir_context *ctx) { struct bch_inode_info *inode = file_bch_inode(file); struct bch_fs *c = inode->v.i_sb->s_fs_info; + int ret; if (!dir_emit_dots(file, ctx)) return 0; - return bch2_readdir(c, inode_inum(inode), ctx); + ret = bch2_readdir(c, inode_inum(inode), ctx); + if (ret) + bch_err_fn(c, ret); + + return bch2_err_class(ret); } static const struct file_operations bch_file_operations = { |