Re: [PATCH] fs:lock_rename()/unlock_rename() can lead to deadlock in distributed fs.

From: Christoph Hellwig
Date: Mon Jun 27 2005 - 04:42:08 EST


On Mon, Jun 27, 2005 at 11:24:49AM +0200, Zuzana Petrova wrote:
> When lock_rename(new_dir, old_dir) is called, the dentries don't match, so we
> end up in a code path that tries to acquire the inode i_sem of both the
> old_dir and new_dir, but since they point to the same inode, the second
> attempt to acquire the same i_sem results in a deadlock.
>
> A fix would be to compare the dentries ->d_inode field instead. Patch for
> kernel 2.6.12.1 attached.

No, that's bogus. Make sure the filesystem never has multiple dentries
for the same directory inode.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/