projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
677bdb7
)
bcachefs: Fix truncate sometimes failing and returning 1
author
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 26 Feb 2025 15:57:26 +0000
(10:57 -0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 27 Feb 2025 00:31:05 +0000
(19:31 -0500)
__bch_truncate_folio() may return 1 to indicate dirtyness of the folio
being truncated, needed for fpunch to get the i_size writes correct.
But truncate was forgetting to clear ret, and sometimes returning it as
an error.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/bcachefs/fs-io.c
b/fs/bcachefs/fs-io.c
index 94bf34b9b65f06cebd02a3fc06497af8bc6162b1..717e7b94c66f87a9bd3ea10f449940886bbac2ce 100644
(file)
--- a/
fs/bcachefs/fs-io.c
+++ b/
fs/bcachefs/fs-io.c
@@
-466,6
+466,7
@@
int bchfs_truncate(struct mnt_idmap *idmap,
ret = bch2_truncate_folio(inode, iattr->ia_size);
if (unlikely(ret < 0))
goto err;
+ ret = 0;
truncate_setsize(&inode->v, iattr->ia_size);