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
2f73086e
Commit
2f73086e
authored
Jun 14, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/net-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
4f78b8d1
1f4b4edf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+20
-13
No files found.
net/sunrpc/rpc_pipe.c
View file @
2f73086e
...
@@ -472,30 +472,37 @@ static void
...
@@ -472,30 +472,37 @@ static void
rpc_depopulate
(
struct
dentry
*
parent
)
rpc_depopulate
(
struct
dentry
*
parent
)
{
{
struct
inode
*
dir
=
parent
->
d_inode
;
struct
inode
*
dir
=
parent
->
d_inode
;
HLIST_HEAD
(
head
);
struct
list_head
*
pos
,
*
next
;
struct
list_head
*
pos
,
*
next
;
struct
dentry
*
dentry
;
struct
dentry
*
dentry
,
*
dvec
[
10
];
int
n
=
0
;
down
(
&
dir
->
i_sem
);
down
(
&
dir
->
i_sem
);
repeat:
spin_lock
(
&
dcache_lock
);
spin_lock
(
&
dcache_lock
);
list_for_each_safe
(
pos
,
next
,
&
parent
->
d_subdirs
)
{
list_for_each_safe
(
pos
,
next
,
&
parent
->
d_subdirs
)
{
dentry
=
list_entry
(
pos
,
struct
dentry
,
d_child
);
dentry
=
list_entry
(
pos
,
struct
dentry
,
d_child
);
spin_lock
(
&
dentry
->
d_lock
);
if
(
!
d_unhashed
(
dentry
))
{
if
(
!
d_unhashed
(
dentry
))
{
dget_locked
(
dentry
);
dget_locked
(
dentry
);
__d_drop
(
dentry
);
__d_drop
(
dentry
);
hlist_add_head
(
&
dentry
->
d_hash
,
&
head
);
spin_unlock
(
&
dentry
->
d_lock
);
}
dvec
[
n
++
]
=
dentry
;
if
(
n
==
ARRAY_SIZE
(
dvec
))
break
;
}
else
spin_unlock
(
&
dentry
->
d_lock
);
}
}
spin_unlock
(
&
dcache_lock
);
spin_unlock
(
&
dcache_lock
);
while
(
!
hlist_empty
(
&
head
))
{
if
(
n
)
{
dentry
=
list_entry
(
head
.
first
,
struct
dentry
,
d_hash
);
do
{
/* Private list, so no dcache_lock needed and use __d_drop */
dentry
=
dvec
[
--
n
];
__d_drop
(
dentry
);
if
(
dentry
->
d_inode
)
{
if
(
dentry
->
d_inode
)
{
rpc_inode_setowner
(
dentry
->
d_inode
,
NULL
);
rpc_inode_setowner
(
dentry
->
d_inode
,
NULL
);
simple_unlink
(
dir
,
dentry
);
simple_unlink
(
dir
,
dentry
);
}
}
dput
(
dentry
);
dput
(
dentry
);
}
while
(
n
);
goto
repeat
;
}
}
up
(
&
dir
->
i_sem
);
up
(
&
dir
->
i_sem
);
}
}
...
...
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