Nick Piggin 949854d024 fs: Use rename lock and RCU for multi-step operations
The remaining usages for dcache_lock is to allow atomic, multi-step read-side
operations over the directory tree by excluding modifications to the tree.
Also, to walk in the leaf->root direction in the tree where we don't have
a natural d_lock ordering.

This could be accomplished by taking every d_lock, but this would mean a
huge number of locks and actually gets very tricky.

Solve this instead by using the rename seqlock for multi-step read-side
operations, retry in case of a rename so we don't walk up the wrong parent.
Concurrent dentry insertions are not serialised against.  Concurrent deletes
are tricky when walking up the directory: our parent might have been deleted
when dropping locks so also need to check and retry for that.

We can also use the rename lock in cases where livelock is a worry (and it
is introduced in subsequent patch).

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
2011-01-07 17:50:22 +11:00
..
2011-01-07 17:50:22 +11:00
2011-01-07 17:50:20 +11:00
2011-01-07 17:50:22 +11:00
2011-01-07 17:50:18 +11:00
2010-10-29 04:16:13 -04:00
2010-10-29 04:16:13 -04:00
2011-01-07 17:50:18 +11:00
2011-01-07 17:50:21 +11:00
2011-01-07 17:50:22 +11:00
2011-01-07 17:50:21 +11:00
2011-01-07 17:50:21 +11:00
2010-10-29 04:16:13 -04:00
2010-10-29 04:16:28 -04:00
2010-10-29 04:16:28 -04:00
2011-01-07 17:50:21 +11:00
2010-10-29 04:16:13 -04:00
2010-10-29 04:16:31 -04:00
2011-01-07 17:50:22 +11:00
2010-10-29 04:16:13 -04:00
2011-01-07 17:50:20 +11:00
2010-10-29 04:16:13 -04:00
2010-11-30 16:39:27 +01:00
2011-01-07 17:50:20 +11:00
2011-01-07 17:50:20 +11:00
2011-01-07 17:50:20 +11:00
2011-01-07 17:50:20 +11:00
2011-01-07 17:50:20 +11:00
2010-10-29 04:16:31 -04:00
2011-01-07 17:50:20 +11:00
2011-01-07 17:50:20 +11:00
2010-10-29 04:16:13 -04:00
2011-01-07 17:50:21 +11:00
2011-01-07 17:50:21 +11:00
2011-01-07 17:50:21 +11:00
2011-01-07 17:50:22 +11:00
2010-10-29 04:16:13 -04:00
2011-01-07 17:50:22 +11:00
2010-10-29 04:16:13 -04:00
2010-11-08 14:29:39 -08:00
2011-01-07 17:50:19 +11:00
2010-10-29 04:16:13 -04:00
2010-10-29 04:16:31 -04:00
2011-01-07 17:50:18 +11:00
2011-01-07 17:50:20 +11:00
2010-10-29 04:16:36 -04:00
2010-10-29 04:16:13 -04:00
2010-10-29 04:16:13 -04:00
2010-10-25 21:26:11 -04:00
2010-10-29 04:16:33 -04:00
2010-10-29 04:16:28 -04:00
2010-10-15 15:53:27 +02:00
2010-08-18 08:35:46 -04:00
2011-01-07 17:50:17 +11:00
2010-10-29 05:49:13 -04:00
2010-10-28 09:44:56 -07:00
2011-01-07 17:50:21 +11:00
2011-01-07 17:50:21 +11:00
2010-10-28 09:44:56 -07:00
2011-01-07 17:50:21 +11:00
2010-10-29 04:14:56 -04:00
2010-08-18 08:35:48 -04:00
2010-08-09 16:48:44 -04:00
2010-10-29 04:17:03 -04:00