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
4513d899
Commit
4513d899
authored
Jul 17, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch d_add_ci() to d_splice_alias() in "found negative" case as well
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
6c673ab3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
fs/dcache.c
fs/dcache.c
+5
-19
No files found.
fs/dcache.c
View file @
4513d899
...
...
@@ -1652,26 +1652,12 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode,
* Negative dentry: instantiate it unless the inode is a directory and
* already has a dentry.
*/
spin_lock
(
&
inode
->
i_lock
);
if
(
!
S_ISDIR
(
inode
->
i_mode
)
||
list_empty
(
&
inode
->
i_dentry
))
{
__d_instantiate
(
found
,
inode
);
spin_unlock
(
&
inode
->
i_lock
);
security_d_instantiate
(
found
,
inode
);
return
found
;
}
/*
* In case a directory already has a (disconnected) entry grab a
* reference to it, move it in place and use it.
*/
new
=
list_entry
(
inode
->
i_dentry
.
next
,
struct
dentry
,
d_alias
);
__dget
(
new
);
spin_unlock
(
&
inode
->
i_lock
);
security_d_instantiate
(
found
,
inode
);
d_move
(
new
,
found
);
iput
(
inode
);
new
=
d_splice_alias
(
inode
,
found
);
if
(
new
)
{
dput
(
found
);
return
new
;
found
=
new
;
}
return
found
;
err_out:
iput
(
inode
);
...
...
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