On Thu, Jul 14, 2011 at 08:21:20AM +0100, Al Viro wrote: > Overall, it might be doable, but it'll take some massage in strange places. > Hell knows; I think at that point in release cycle we don't want to go > there. After looking through ->d_lock users I'm mostly convinced that > unlazy_walk() fix + making damn sure we don't try to create loops in > d_materialise_unique() + adding missing ->i_mutex where needed is the > way to go for now. We have several places where ->d_lock overlap is > not parent-to-child, but these really can't lead to deadlocks - fs is > specialized enough to prevent them. OK, hopefully that should take care of the ->d_lock for now; missing ->i_mutex is *not* dealt with yet, since I'm yet to finish ->d_parent code review. dentry_lock_for_move() is serialized by rename_lock now (call in __dentry_materialise_unique() used to be done without it; fixed in this series), so we can't have more than one of those in any potential deadlock set. Everything else either does lock child after immediate parent or happens on filesystems that see neither d_move() nor d_materialise_unique() and have serialization of their own. IOW, I think that should be enough to avoid deadlocks for in-tree filesystems for the time being; anything more dramatic will have to wait for the next merge window - it's too late in the cycle to do anything daring in that area... Usual place, git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git/ for-linus Shortlog: Al Viro (2): Fix ->d_lock locking order in unlazy_walk() fix loop checks in d_materialise_unique() Diffstat: fs/dcache.c | 51 ++++++++++++++++++++++++++++++++++----------------- fs/namei.c | 2 ++ 2 files changed, 36 insertions(+), 17 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html