@@ -402,7 +402,6 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
402402 dev_t rdev ;
403403 int retval ;
404404 umode_t umode ;
405- unsigned long i_ino ;
406405 struct inode * inode ;
407406 struct v9fs_session_info * v9ses = sb -> s_fs_info ;
408407 int (* test )(struct inode * inode , void * data );
@@ -412,8 +411,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
412411 else
413412 test = v9fs_test_inode ;
414413
415- i_ino = v9fs_qid2ino (qid );
416- inode = iget5_locked (sb , i_ino , test , v9fs_set_inode , st );
414+ inode = iget5_locked (sb , QID2INO (qid ), test , v9fs_set_inode , st );
417415 if (!inode )
418416 return ERR_PTR (- ENOMEM );
419417 if (!(inode -> i_state & I_NEW ))
@@ -423,7 +421,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
423421 * FIXME!! we may need support for stale inodes
424422 * later.
425423 */
426- inode -> i_ino = i_ino ;
424+ inode -> i_ino = QID2INO ( qid ) ;
427425 umode = p9mode2unixmode (v9ses , st , & rdev );
428426 retval = v9fs_init_inode (v9ses , inode , umode , rdev );
429427 if (retval )
@@ -1156,26 +1154,6 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
11561154 v9inode -> cache_validity &= ~V9FS_INO_INVALID_ATTR ;
11571155}
11581156
1159- /**
1160- * v9fs_qid2ino - convert qid into inode number
1161- * @qid: qid to hash
1162- *
1163- * BUG: potential for inode number collisions?
1164- */
1165-
1166- ino_t v9fs_qid2ino (struct p9_qid * qid )
1167- {
1168- u64 path = qid -> path + 2 ;
1169- ino_t i = 0 ;
1170-
1171- if (sizeof (ino_t ) == sizeof (path ))
1172- memcpy (& i , & path , sizeof (ino_t ));
1173- else
1174- i = (ino_t ) (path ^ (path >> 32 ));
1175-
1176- return i ;
1177- }
1178-
11791157/**
11801158 * v9fs_vfs_get_link - follow a symlink path
11811159 * @dentry: dentry for symlink
0 commit comments