projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7468c4e
)
bcachefs: Fix an i_sectors accounting bug
author
Kent Overstreet
<kent.overstreet@gmail.com>
Mon, 22 Nov 2021 03:34:26 +0000
(22:34 -0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:17 +0000
(17:09 -0400)
We weren't checking for errors before calling i_sectors_acct()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/fs-io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/fs-io.c
b/fs/bcachefs/fs-io.c
index ac013bb99a4367dd0e2fabcb055f8914e8016de8..dff6d754721237e6ec4267d9a3a2c5bf5c59becc 100644
(file)
--- a/
fs/bcachefs/fs-io.c
+++ b/
fs/bcachefs/fs-io.c
@@
-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, "a_res, i_sectors_delta);
bkey_err:
bch2_quota_reservation_put(c, inode, "a_res);