diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-23 05:48:35 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:08 -0400 |
commit | 73ab6f356db737d9997c830730ab927bbdf6b678 (patch) | |
tree | 11dc2fce1f582b654442a637edea0ba98f411d2f /fs/bcachefs/fs.c | |
parent | 3142e7ef4b39f03c1e1aac90c2ac8f07f55ffa64 (diff) | |
download | lwn-73ab6f356db737d9997c830730ab927bbdf6b678.tar.gz lwn-73ab6f356db737d9997c830730ab927bbdf6b678.zip |
bcachefs: fix fsync after create
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r-- | fs/bcachefs/fs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index cd29404e0b9b..5963f88b8156 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -327,6 +327,7 @@ __bch2_create(struct mnt_idmap *idmap, struct bch_inode_unpacked inode_u; struct bch_hash_info hash_info; struct posix_acl *default_acl = NULL, *acl = NULL; + u64 journal_seq = 0; int ret; bch2_inode_init(c, &inode_u, 0, 0, 0, rdev, &dir->ei_inode); @@ -391,7 +392,7 @@ retry: &inode_u) : 0) ?: bch2_trans_commit(&trans, NULL, NULL, - &inode->ei_journal_seq, + &journal_seq, BTREE_INSERT_ATOMIC| BTREE_INSERT_NOUNLOCK); if (ret == -EINTR) @@ -409,6 +410,7 @@ retry: } bch2_vfs_inode_init(c, inode, &inode_u); + journal_seq_copy(inode, journal_seq); set_cached_acl(&inode->v, ACL_TYPE_ACCESS, acl); set_cached_acl(&inode->v, ACL_TYPE_DEFAULT, default_acl); |