Commit 73ab6f35 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: fix fsync after create

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3142e7ef
......@@ -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 @@ __bch2_create(struct mnt_idmap *idmap,
&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 @@ __bch2_create(struct mnt_idmap *idmap,
}
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);
......
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