From 02323db17e3a73dd335690b7b1a2392912b05513 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 2 May 2014 13:50:02 -0400 Subject: [PATCH] cifs: fix cifs_uniqueid_to_ino_t not to ever return 0 Currently, when the top and bottom 32-bit words are equivalent and the host is a 32-bit arch, cifs_uniqueid_to_ino_t returns 0 as the ino_t value. All we're doing to hash the value down to 32 bits is xor'ing the top and bottom 32-bit words and that obviously results in 0 if they are equivalent. The kernel doesn't really care if it returns this value, but some userland apps (like "ls") will ignore dirents that have a zero d_ino value. Change this function to use hash_64 to convert this value to a 31 bit value and then add 1 to ensure that it doesn't ever return 0. Also, there's no need to check the sizeof(ino_t) at runtime so create two different cifs_uniqueid_to_ino_t functions based on whether BITS_PER_LONG is 64 for not. This should fix: https://bugzilla.kernel.org/show_bug.cgi?id=19282 Reported-by: Eric Reported-by: Signed-off-by: Jeff Layton Signed-off-by: Steve French --- Reading git-format-patch failed