@@ -224,11 +224,12 @@ cifs_new_inode(struct super_block *sb, __u64 *inum)
/*
* BB: Is i_ino == 0 legal? Here, we assume that it is. If it isn't we
* stop passing inum as ptr. Are there sanity checks we can use to
- * ensure that the server is really filling in that field? Also,
- * if serverino is disabled, perhaps we should be using iunique()?
+ * ensure that the server is really filling in that field?
*/
if (inum && (CIFS_SB(sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM))
inode->i_ino = (unsigned long) *inum;
+ else
+ inode->i_ino = iunique(sb, ROOT_I);
/*
* must set this here instead of cifs_alloc_inode since VFS will
...to make sure that we get unique inode numbers when we're generating them on the fly. Signed-off-by: Jeff Layton <jlayton@redhat.com> --- fs/cifs/inode.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)