mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user