From: Hans Reiser Reiser4 pseudo files exist within regular files also. For example, "/etc/passwd/..uid" is a valid path. This introduces situation impossible in the traditional UNIX file system: non-leaf object in file system name-space tree ("/etc/passwd"), may have more than one name (nlink > 1). But in normal UNIX file system all non-leaf objects are directories, and directories cannot have multiple names. Specifically, directory can have only one dentry. During rename(2) this is used to check whether file is renamed within the same directory and moved to another one. This check doesn't work in reiser4 as is. Fix it. Signed-off-by: Andrew Morton --- 25-akpm/fs/namei.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN fs/namei.c~reiser4-aliased-dir fs/namei.c --- 25/fs/namei.c~reiser4-aliased-dir 2004-11-15 20:02:08.632243272 -0800 +++ 25-akpm/fs/namei.c 2004-11-15 20:02:08.638242360 -0800 @@ -1187,7 +1187,7 @@ struct dentry *lock_rename(struct dentry { struct dentry *p; - if (p1 == p2) { + if (p1->d_inode == p2->d_inode) { down(&p1->d_inode->i_sem); return NULL; } @@ -1218,7 +1218,7 @@ struct dentry *lock_rename(struct dentry void unlock_rename(struct dentry *p1, struct dentry *p2) { up(&p1->d_inode->i_sem); - if (p1 != p2) { + if (p1->d_inode != p2->d_inode) { up(&p2->d_inode->i_sem); up(&p1->d_inode->i_sb->s_vfs_rename_sem); } _