Commit 8810386f authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix an i_sectors accounting bug

We weren't checking for errors before calling i_sectors_acct()
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 7468c4ef
......@@ -2806,6 +2806,8 @@ static int __bchfs_fallocate(struct bch_inode_info *inode, int mode,
&reservation.k_i,
&disk_res, NULL,
0, &i_sectors_delta, true);
if (ret)
goto bkey_err;
i_sectors_acct(c, inode, &quota_res, i_sectors_delta);
bkey_err:
bch2_quota_reservation_put(c, inode, &quota_res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment