diff options
| author | Kent Overstreet <[email protected]> | 2025-02-26 15:57:26 +0000 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2025-02-27 00:31:05 +0000 |
| commit | eb54d2695b57426638fed0ec066ae17a18c4426c (patch) | |
| tree | cf0df2f3286df7fc16047fcd2fe68484b19c1efe | |
| parent | bcachefs: Fix deadlock (diff) | |
| download | kernel-eb54d2695b57426638fed0ec066ae17a18c4426c.tar.gz kernel-eb54d2695b57426638fed0ec066ae17a18c4426c.zip | |
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 <[email protected]>
| -rw-r--r-- | fs/bcachefs/fs-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 94bf34b9b65f..717e7b94c66f 100644 --- 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); |
