Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 November 2006 18:28:35 +0100, Jörn Engel wrote:
> 
> Anyway, here is a first patch converting some callers that looked
> obvious.

Next patch with the not-so-obvious ones.  I believe this patch is
correct, but someone should double-check it.

Jfs really surprised me.  It appears as if it just takes the number
returned from new_inode in some cases - unbelievable.

Jörn

-- 
"[One] doesn't need to know [...] how to cause a headache in order
to take an aspirin."
-- Scott Culp, Manager of the Microsoft Security Response Center, 2001


Signed-off-by: Jörn Engel <[email protected]>
---

 fs/9p/vfs_inode.c  |    2 +-
 fs/cifs/inode.c    |    8 +++++---
 fs/jfs/jfs_inode.c |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

--- iunique/fs/9p/vfs_inode.c~iunique_nonobvious	2006-10-13 15:55:45.000000000 +0200
+++ iunique/fs/9p/vfs_inode.c	2006-11-07 18:30:59.000000000 +0100
@@ -199,7 +199,7 @@ struct inode *v9fs_get_inode(struct supe
 
 	dprintk(DEBUG_VFS, "super block: %p mode: %o\n", sb, mode);
 
-	inode = new_inode(sb);
+	inode = new_inode_autonum(sb);
 	if (inode) {
 		inode->i_mode = mode;
 		inode->i_uid = current->fsuid;
--- iunique/fs/cifs/inode.c~iunique_nonobvious	2006-10-13 15:55:50.000000000 +0200
+++ iunique/fs/cifs/inode.c	2006-11-07 18:33:53.000000000 +0100
@@ -90,7 +90,9 @@ int cifs_get_inode_info_unix(struct inod
 			if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
 				(*pinode)->i_ino =
 					(unsigned long)findData.UniqueId;
-			} /* note ino incremented to unique num in new_inode */
+			} else {
+				(*pinode)->i_ino = iunique(sb, 0);
+			}
 			insert_inode_hash(*pinode);
 		}
 
@@ -384,7 +386,7 @@ int cifs_get_inode_info(struct inode **p
 
 		/* get new inode */
 		if (*pinode == NULL) {
-			*pinode = new_inode(sb);
+			*pinode = new_inode_autonum(sb);
 			if (*pinode == NULL)
 				return -ENOMEM;
 			/* Is an i_ino of zero legal? Can we use that to check
@@ -416,7 +418,7 @@ int cifs_get_inode_info(struct inode **p
 					/* BB EOPNOSUPP disable SERVER_INUM? */
 				} else /* do we need cast or hash to ino? */
 					(*pinode)->i_ino = inode_num;
-			} /* else ino incremented to unique num in new_inode*/
+			} /* else ino incremented to unique num in new_inode_autonum*/
 			insert_inode_hash(*pinode);
 		}
 		inode = *pinode;
--- iunique/fs/jfs/jfs_inode.c~iunique_nonobvious	2006-10-13 15:56:05.000000000 +0200
+++ iunique/fs/jfs/jfs_inode.c	2006-11-07 18:36:55.000000000 +0100
@@ -58,7 +58,7 @@ struct inode *ialloc(struct inode *paren
 	struct jfs_inode_info *jfs_inode;
 	int rc;
 
-	inode = new_inode(sb);
+	inode = new_inode_autonum(sb);
 	if (!inode) {
 		jfs_warn("ialloc: new_inode returned NULL!");
 		return inode;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux