Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux-yocto
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
git.yoctoproject.org
linux-yocto
Commits
b02f973e
Commit
b02f973e
authored
9 months ago
by
Kent Overstreet
Browse files
Options
Downloads
Patches
Plain Diff
bcachefs: Fix bch2_inode_insert() race path for tmpfiles
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
29f1c1ae
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/bcachefs/fs.c
+6
-0
6 additions, 0 deletions
fs/bcachefs/fs.c
with
6 additions
and
0 deletions
fs/bcachefs/fs.c
+
6
−
0
View file @
b02f973e
...
@@ -194,6 +194,12 @@ static struct bch_inode_info *bch2_inode_insert(struct bch_fs *c, struct bch_ino
...
@@ -194,6 +194,12 @@ static struct bch_inode_info *bch2_inode_insert(struct bch_fs *c, struct bch_ino
* discard_new_inode() expects it to be set...
* discard_new_inode() expects it to be set...
*/
*/
inode
->
v
.
i_flags
|=
I_NEW
;
inode
->
v
.
i_flags
|=
I_NEW
;
/*
* We don't want bch2_evict_inode() to delete the inode on disk,
* we just raced and had another inode in cache. Normally new
* inodes don't have nlink == 0 - except tmpfiles do...
*/
set_nlink
(
&
inode
->
v
,
1
);
discard_new_inode
(
&
inode
->
v
);
discard_new_inode
(
&
inode
->
v
);
inode
=
old
;
inode
=
old
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment