lkml.org 
[lkml]   [2003]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.5.70-bk16: nfs crash

On Thu, 12 Jun 2003, Trond Myklebust wrote:
>
> I still need a real fix for d_move().

How about something like this.. It still breaks if the _target_ is
unhashed, but quite frankly, if you have unhashed the target, I think
something is seriously wrong.

Linus

---
===== fs/dcache.c 1.57 vs edited =====
--- 1.57/fs/dcache.c Sat Jun 7 10:17:01 2003
+++ edited/fs/dcache.c Thu Jun 12 09:42:48 2003
@@ -1221,10 +1221,14 @@
}

/* Move the dentry to the target hash queue, if on different bucket */
+ if (dentry->d_vfs_flags & DCACHE_UNHASHED)
+ goto already_unhashed;
if (dentry->d_bucket != target->d_bucket) {
- dentry->d_bucket = target->d_bucket;
hlist_del_rcu(&dentry->d_hash);
+already_unhashed:
+ dentry->d_bucket = target->d_bucket;
hlist_add_head_rcu(&dentry->d_hash, target->d_bucket);
+ dentry->d_vfs_flags &= ~DCACHE_UNHASHED;
}

/* Unhash the target: dput() will then get rid of it */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [from the cache]
©2003-2011 Jasper Spaans