linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* aliased directories, was Re: 2.6.8.1-mm2
       [not found] <20040819014204.2d412e9b.akpm@osdl.org>
@ 2004-08-19  9:39 ` Christoph Hellwig
  2004-08-19  9:43 ` 2.6.8.1-mm2 Christoph Hellwig
  1 sibling, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2004-08-19  9:39 UTC (permalink / raw)
  To: Andrew Morton, viro, reiser; +Cc: linux-fsdevel

> +reiser4-aliased-dir.patch

Looks like we're getting hardlinks on directories through the backdoor now.

Hans, are you volunteering to audit the VFS for all the other assumptions?


From: Hans Reiser <reiser@namesys.com>

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 <akpm@osdl.org>
---

 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	Wed Aug 18 16:42:44 2004
+++ 25-akpm/fs/namei.c	Wed Aug 18 16:42:44 2004
@@ -1169,7 +1169,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;
 	}
@@ -1200,7 +1200,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);
 	}
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.6.8.1-mm2
       [not found] <20040819014204.2d412e9b.akpm@osdl.org>
  2004-08-19  9:39 ` aliased directories, was Re: 2.6.8.1-mm2 Christoph Hellwig
@ 2004-08-19  9:43 ` Christoph Hellwig
  1 sibling, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2004-08-19  9:43 UTC (permalink / raw)
  To: Andrew Morton, reiser; +Cc: linux-fsdevel, viro

> +reiser4-allow-drop_inode-implementation.patch
> +reiser4-allow-drop_inode-implementation-cleanup.patch

Please don't do this.  The only reason reiser4 needs that is because
their broken internal plugin scheme that can't distinguish ->rmdir and
->unlink forces them to reimplement the generic code inside the fs driver.

It's not the kind of functions we want exported.

> +reiser4-export-inode_lock.patch
> +reiser4-export-inode_lock-cleanup.patch

Similarly inode_lock is nothing that should be exported to drivers, it's
too much of an internal that can change - and something drivers can really
badly screw up on.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-19  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040819014204.2d412e9b.akpm@osdl.org>
2004-08-19  9:39 ` aliased directories, was Re: 2.6.8.1-mm2 Christoph Hellwig
2004-08-19  9:43 ` 2.6.8.1-mm2 Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).