Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
6b38e842
Commit
6b38e842
authored
Dec 30, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nfsd race fixes: ext4
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c38012da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
fs/ext4/ialloc.c
fs/ext4/ialloc.c
+5
-1
fs/ext4/namei.c
fs/ext4/namei.c
+13
-1
No files found.
fs/ext4/ialloc.c
View file @
6b38e842
...
...
@@ -826,7 +826,10 @@ got:
ext4_set_inode_flags
(
inode
);
if
(
IS_DIRSYNC
(
inode
))
handle
->
h_sync
=
1
;
insert_inode_hash
(
inode
);
if
(
insert_inode_locked
(
inode
)
<
0
)
{
err
=
-
EINVAL
;
goto
fail_drop
;
}
spin_lock
(
&
sbi
->
s_next_gen_lock
);
inode
->
i_generation
=
sbi
->
s_next_generation
++
;
spin_unlock
(
&
sbi
->
s_next_gen_lock
);
...
...
@@ -881,6 +884,7 @@ fail_drop:
DQUOT_DROP
(
inode
);
inode
->
i_flags
|=
S_NOQUOTA
;
inode
->
i_nlink
=
0
;
unlock_new_inode
(
inode
);
iput
(
inode
);
brelse
(
bitmap_bh
);
return
ERR_PTR
(
err
);
...
...
fs/ext4/namei.c
View file @
6b38e842
...
...
@@ -1693,9 +1693,11 @@ static int ext4_add_nondir(handle_t *handle,
if
(
!
err
)
{
ext4_mark_inode_dirty
(
handle
,
inode
);
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
return
0
;
}
drop_nlink
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
return
err
;
}
...
...
@@ -1830,6 +1832,7 @@ retry:
if
(
err
)
{
out_clear_inode:
clear_nlink
(
inode
);
unlock_new_inode
(
inode
);
ext4_mark_inode_dirty
(
handle
,
inode
);
iput
(
inode
);
goto
out_stop
;
...
...
@@ -1838,6 +1841,7 @@ out_clear_inode:
ext4_update_dx_flag
(
dir
);
ext4_mark_inode_dirty
(
handle
,
dir
);
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
out_stop:
ext4_journal_stop
(
handle
);
if
(
err
==
-
ENOSPC
&&
ext4_should_retry_alloc
(
dir
->
i_sb
,
&
retries
))
...
...
@@ -2212,6 +2216,7 @@ retry:
mapping_gfp_mask
(
inode
->
i_mapping
)
&
~
__GFP_FS
);
if
(
err
)
{
clear_nlink
(
inode
);
unlock_new_inode
(
inode
);
ext4_mark_inode_dirty
(
handle
,
inode
);
iput
(
inode
);
goto
out_stop
;
...
...
@@ -2262,7 +2267,14 @@ retry:
ext4_inc_count
(
handle
,
inode
);
atomic_inc
(
&
inode
->
i_count
);
err
=
ext4_add_nondir
(
handle
,
dentry
,
inode
);
err
=
ext4_add_entry
(
handle
,
dentry
,
inode
);
if
(
!
err
)
{
ext4_mark_inode_dirty
(
handle
,
inode
);
d_instantiate
(
dentry
,
inode
);
}
else
{
drop_nlink
(
inode
);
iput
(
inode
);
}
ext4_journal_stop
(
handle
);
if
(
err
==
-
ENOSPC
&&
ext4_should_retry_alloc
(
dir
->
i_sb
,
&
retries
))
goto
retry
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment