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
62d9956c
Commit
62d9956c
authored
Mar 06, 2018
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle move to LRU in retain_dentry()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
a338579f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
fs/dcache.c
fs/dcache.c
+6
-13
No files found.
fs/dcache.c
View file @
62d9956c
...
...
@@ -440,17 +440,6 @@ static void d_lru_shrink_move(struct list_lru_one *lru, struct dentry *dentry,
list_lru_isolate_move
(
lru
,
&
dentry
->
d_lru
,
list
);
}
/*
* dentry_lru_(add|del)_list) must be called with d_lock held.
*/
static
void
dentry_lru_add
(
struct
dentry
*
dentry
)
{
if
(
unlikely
(
!
(
dentry
->
d_flags
&
DCACHE_LRU_LIST
)))
d_lru_add
(
dentry
);
else
if
(
unlikely
(
!
(
dentry
->
d_flags
&
DCACHE_REFERENCED
)))
dentry
->
d_flags
|=
DCACHE_REFERENCED
;
}
/**
* d_drop - drop a dentry
* @dentry: dentry to drop
...
...
@@ -641,6 +630,12 @@ static inline bool retain_dentry(struct dentry *dentry)
if
(
dentry
->
d_op
->
d_delete
(
dentry
))
return
false
;
}
/* retain; LRU fodder */
dentry
->
d_lockref
.
count
--
;
if
(
unlikely
(
!
(
dentry
->
d_flags
&
DCACHE_LRU_LIST
)))
d_lru_add
(
dentry
);
else
if
(
unlikely
(
!
(
dentry
->
d_flags
&
DCACHE_REFERENCED
)))
dentry
->
d_flags
|=
DCACHE_REFERENCED
;
return
true
;
}
...
...
@@ -823,8 +818,6 @@ void dput(struct dentry *dentry)
rcu_read_unlock
();
if
(
likely
(
retain_dentry
(
dentry
)))
{
dentry_lru_add
(
dentry
);
dentry
->
d_lockref
.
count
--
;
spin_unlock
(
&
dentry
->
d_lock
);
return
;
}
...
...
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