diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-23 05:48:53 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-23 05:48:53 -0400 |
commit | 693646e0c44198ca074a92b773cd6a6b31d5e27f (patch) | |
tree | 9c88659f3046f337736bb1900c9eefbbf33a2762 | |
parent | d5e6e997eba505f709f71aa5a8248444a26e0760 (diff) |
bcachefs: fix mtime/ctime update on truncate
-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 0eccccf62a2f..a3504b19c908 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); |