10000 bcachefs: Fix truncate sometimes failing and returning 1 · GutMutCode/arch-linux@eb54d26 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb54d26

Browse files
author
Kent Overstreet
committed
bcachefs: Fix truncate sometimes failing and returning 1
__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>
1 parent 677bdb7 commit eb54d26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/bcachefs/fs-io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ int bchfs_truncate(struct mnt_idmap *idmap,
466466
ret = bch2_truncate_folio(inode, iattr->ia_size);
467467
if (unlikely(ret < 0))
468468
goto err;
469+
ret = 0;
469470

470471
truncate_setsize(&inode->v, iattr->ia_size);
471472

0 commit comments

Comments
 (0)
0