Commit 658971f2 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: fix mtime/ctime update on truncate

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 73ab6f35
......@@ -278,7 +278,8 @@ static int i_sectors_dirty_finish(struct bch_fs *c, struct i_sectors_hook *h)
mutex_lock(&h->inode->ei_update_lock);
i_sectors_acct(c, h->inode, &h->quota_res, h->sectors);
ret = bch2_write_inode(c, h->inode, i_sectors_dirty_finish_fn, h, 0);
ret = bch2_write_inode(c, h->inode, i_sectors_dirty_finish_fn,
h, ATTR_MTIME|ATTR_CTIME);
if (!ret && h->new_i_size != U64_MAX)
i_size_write(&h->inode->v, h->new_i_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment