1 diff -u --recursive --new-file linux-2.5.71/net/sunrpc/rpc_pipe.c linux-2.5.71-fix_rpcpipe/net/sunrpc/rpc_pipe.c
2 --- linux-2.5.71/net/sunrpc/rpc_pipe.c 2003-06-11 19:24:29.000000000 -0700
3 +++ linux-2.5.71-fix_rpcpipe/net/sunrpc/rpc_pipe.c 2003-06-14 16:58:21.000000000 -0700
5 rpc_depopulate(struct dentry *parent)
7 struct inode *dir = parent->d_inode;
9 struct list_head *pos, *next;
10 - struct dentry *dentry;
11 + struct dentry *dentry, *dvec[10];
16 spin_lock(&dcache_lock);
17 list_for_each_safe(pos, next, &parent->d_subdirs) {
18 dentry = list_entry(pos, struct dentry, d_child);
19 + spin_lock(&dentry->d_lock);
20 if (!d_unhashed(dentry)) {
23 - hlist_add_head(&dentry->d_hash, &head);
25 + spin_unlock(&dentry->d_lock);
27 + if (n == ARRAY_SIZE(dvec))
30 + spin_unlock(&dentry->d_lock);
32 spin_unlock(&dcache_lock);
33 - while (!hlist_empty(&head)) {
34 - dentry = list_entry(head.first, struct dentry, d_hash);
35 - /* Private list, so no dcache_lock needed and use __d_drop */
37 - if (dentry->d_inode) {
38 - rpc_inode_setowner(dentry->d_inode, NULL);
39 - simple_unlink(dir, dentry);
45 + if (dentry->d_inode) {
46 + rpc_inode_setowner(dentry->d_inode, NULL);
47 + simple_unlink(dir, dentry);