Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e4502c63
Commit
e4502c63
authored
Sep 26, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ufs: deal with nfsd/iget races
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
2c80929c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
fs/ufs/ialloc.c
fs/ufs/ialloc.c
+5
-1
fs/ufs/namei.c
fs/ufs/namei.c
+4
-0
No files found.
fs/ufs/ialloc.c
View file @
e4502c63
...
...
@@ -298,7 +298,10 @@ struct inode *ufs_new_inode(struct inode *dir, umode_t mode)
ufsi
->
i_oeftflag
=
0
;
ufsi
->
i_dir_start_lookup
=
0
;
memset
(
&
ufsi
->
i_u1
,
0
,
sizeof
(
ufsi
->
i_u1
));
insert_inode_hash
(
inode
);
if
(
insert_inode_locked
(
inode
)
<
0
)
{
err
=
-
EIO
;
goto
failed
;
}
mark_inode_dirty
(
inode
);
if
(
uspi
->
fs_magic
==
UFS2_MAGIC
)
{
...
...
@@ -337,6 +340,7 @@ struct inode *ufs_new_inode(struct inode *dir, umode_t mode)
fail_remove_inode:
unlock_ufs
(
sb
);
clear_nlink
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
UFSD
(
"EXIT (FAILED): err %d
\n
"
,
err
);
return
ERR_PTR
(
err
);
...
...
fs/ufs/namei.c
View file @
e4502c63
...
...
@@ -38,10 +38,12 @@ static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode)
{
int
err
=
ufs_add_link
(
dentry
,
inode
);
if
(
!
err
)
{
unlock_new_inode
(
inode
);
d_instantiate
(
dentry
,
inode
);
return
0
;
}
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
return
err
;
}
...
...
@@ -155,6 +157,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
out_fail:
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
goto
out
;
}
...
...
@@ -210,6 +213,7 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
out_fail:
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
inode_dec_link_count
(
dir
);
unlock_ufs
(
dir
->
i_sb
);
...
...
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