mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 03:40:04 +00:00
bcachefs: fix mtime/ctime update on truncate
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
73ab6f356d
commit
658971f276
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue