[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.58.0701302314210.2203@be1.lrz>
Date: Tue, 30 Jan 2007 23:40:35 +0100 (CET)
From: Bodo Eggert <7eggert@....de>
To: akpm@...l.org, Jeff Layton <jlayton@...hat.com>, dev@...ru,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
torvalds@...l.org
Subject: [PATCH] pipefs unique inode numbers
change pipefs to use a unique inode number equal to the memory
address unless it would be truncated.
Signed-Off-By: Bodo Eggert <7eggert@....de>
---
Tested on i386.
--- 2.6.19/fs/pipe.c.ori 2007-01-30 22:02:46.000000000 +0100
+++ 2.6.19/fs/pipe.c 2007-01-30 23:22:27.000000000 +0100
@@ -864,6 +864,10 @@ static struct inode * get_pipe_inode(voi
inode->i_uid = current->fsuid;
inode->i_gid = current->fsgid;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+ /* The address of *inode is unique, so we'll get an unique inode number.
+ * Off cause this will not work for 32 bit inodes on 64 bit systems. */
+ if (sizeof(inode->i_ino) >= sizeof(struct inode*))
+ inode->i_ino = (unsigned int) inode;
return inode;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists