summaryrefslogtreecommitdiff
path: root/libbcachefs/fsck.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/fsck.c')
-rw-r--r--libbcachefs/fsck.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbcachefs/fsck.c b/libbcachefs/fsck.c
index c6ca5968..5a6df3d1 100644
--- a/libbcachefs/fsck.c
+++ b/libbcachefs/fsck.c
@@ -1265,6 +1265,8 @@ static int check_inode(struct btree_trans *trans,
u.bi_inum))) {
bch_verbose(c, "deleting inode %llu", u.bi_inum);
+ bch2_fs_lazy_rw(c);
+
ret = bch2_inode_rm(c, u.bi_inum);
if (ret)
bch_err(c, "error in fsck: error %i while deleting inode", ret);
@@ -1277,6 +1279,8 @@ static int check_inode(struct btree_trans *trans,
u.bi_inum))) {
bch_verbose(c, "truncating inode %llu", u.bi_inum);
+ bch2_fs_lazy_rw(c);
+
/*
* XXX: need to truncate partial blocks too here - or ideally
* just switch units to bytes and that issue goes away