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
b61625d2
Commit
b61625d2
authored
Oct 04, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fold __d_shrink() into its only remaining caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
eee5cc27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
fs/dcache.c
fs/dcache.c
+10
-22
No files found.
fs/dcache.c
View file @
b61625d2
...
...
@@ -483,27 +483,6 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent)
return
parent
;
}
/*
* Unhash a dentry without inserting an RCU walk barrier or checking that
* dentry->d_lock is locked. The caller must take care of that, if
* appropriate.
*/
static
void
__d_shrink
(
struct
dentry
*
dentry
)
{
if
(
!
d_unhashed
(
dentry
))
{
struct
hlist_bl_head
*
b
;
if
(
unlikely
(
dentry
->
d_flags
&
DCACHE_DISCONNECTED
))
b
=
&
dentry
->
d_sb
->
s_anon
;
else
b
=
d_hash
(
dentry
->
d_parent
,
dentry
->
d_name
.
hash
);
hlist_bl_lock
(
b
);
__hlist_bl_del
(
&
dentry
->
d_hash
);
dentry
->
d_hash
.
pprev
=
NULL
;
hlist_bl_unlock
(
b
);
}
}
/**
* d_drop - drop a dentry
* @dentry: dentry to drop
...
...
@@ -522,7 +501,16 @@ static void __d_shrink(struct dentry *dentry)
void
__d_drop
(
struct
dentry
*
dentry
)
{
if
(
!
d_unhashed
(
dentry
))
{
__d_shrink
(
dentry
);
struct
hlist_bl_head
*
b
;
if
(
unlikely
(
dentry
->
d_flags
&
DCACHE_DISCONNECTED
))
b
=
&
dentry
->
d_sb
->
s_anon
;
else
b
=
d_hash
(
dentry
->
d_parent
,
dentry
->
d_name
.
hash
);
hlist_bl_lock
(
b
);
__hlist_bl_del
(
&
dentry
->
d_hash
);
dentry
->
d_hash
.
pprev
=
NULL
;
hlist_bl_unlock
(
b
);
dentry_rcuwalk_barrier
(
dentry
);
}
}
...
...
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