mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
bcachefs: fix fsync after create
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3142e7ef4b
commit
73ab6f356d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user