diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-23 05:48:53 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:08 -0400 |
commit | 658971f2769a8c9beaa09dd52218b5b2d17ca497 (patch) | |
tree | b51863217022c57dcc5952e3e38e123f276c0efe /fs | |
parent | 73ab6f356db737d9997c830730ab927bbdf6b678 (diff) |
bcachefs: fix mtime/ctime update on truncate
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/fs-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 33c379ecf5a1..ed028b5b7613 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -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); |