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
3a8e3611
Commit
3a8e3611
authored
Apr 15, 2018
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d_walk(): kill 'finish' callback
no users left Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
ff17fa56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
fs/dcache.c
fs/dcache.c
+7
-11
No files found.
fs/dcache.c
View file @
3a8e3611
...
...
@@ -1230,13 +1230,11 @@ enum d_walk_ret {
* @parent: start of walk
* @data: data passed to @enter() and @finish()
* @enter: callback when first entering the dentry
* @finish: callback when successfully finished the walk
*
* The @enter()
and @finish()
callbacks are called with d_lock held.
* The @enter() callbacks are called with d_lock held.
*/
static
void
d_walk
(
struct
dentry
*
parent
,
void
*
data
,
enum
d_walk_ret
(
*
enter
)(
void
*
,
struct
dentry
*
),
void
(
*
finish
)(
void
*
))
enum
d_walk_ret
(
*
enter
)(
void
*
,
struct
dentry
*
))
{
struct
dentry
*
this_parent
;
struct
list_head
*
next
;
...
...
@@ -1325,8 +1323,6 @@ static void d_walk(struct dentry *parent, void *data,
if
(
need_seqretry
(
&
rename_lock
,
seq
))
goto
rename_retry
;
rcu_read_unlock
();
if
(
finish
)
finish
(
data
);
out_unlock:
spin_unlock
(
&
this_parent
->
d_lock
);
...
...
@@ -1375,7 +1371,7 @@ int path_has_submounts(const struct path *parent)
struct
check_mount
data
=
{
.
mnt
=
parent
->
mnt
,
.
mounted
=
0
};
read_seqlock_excl
(
&
mount_lock
);
d_walk
(
parent
->
dentry
,
&
data
,
path_check_mount
,
NULL
);
d_walk
(
parent
->
dentry
,
&
data
,
path_check_mount
);
read_sequnlock_excl
(
&
mount_lock
);
return
data
.
mounted
;
...
...
@@ -1483,7 +1479,7 @@ void shrink_dcache_parent(struct dentry *parent)
data
.
start
=
parent
;
data
.
found
=
0
;
d_walk
(
parent
,
&
data
,
select_collect
,
NULL
);
d_walk
(
parent
,
&
data
,
select_collect
);
if
(
!
data
.
found
)
break
;
...
...
@@ -1518,7 +1514,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
static
void
do_one_tree
(
struct
dentry
*
dentry
)
{
shrink_dcache_parent
(
dentry
);
d_walk
(
dentry
,
dentry
,
umount_check
,
NULL
);
d_walk
(
dentry
,
dentry
,
umount_check
);
d_drop
(
dentry
);
dput
(
dentry
);
}
...
...
@@ -1575,7 +1571,7 @@ void d_invalidate(struct dentry *dentry)
shrink_dcache_parent
(
dentry
);
for
(;;)
{
struct
dentry
*
victim
=
NULL
;
d_walk
(
dentry
,
&
victim
,
find_submount
,
NULL
);
d_walk
(
dentry
,
&
victim
,
find_submount
);
if
(
!
victim
)
{
if
(
had_submounts
)
shrink_dcache_parent
(
dentry
);
...
...
@@ -3082,7 +3078,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
void
d_genocide
(
struct
dentry
*
parent
)
{
d_walk
(
parent
,
parent
,
d_genocide_kill
,
NULL
);
d_walk
(
parent
,
parent
,
d_genocide_kill
);
}
EXPORT_SYMBOL
(
d_genocide
);
...
...
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