summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsfs.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-03-11 18:08:49 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-03-11 18:08:49 -0300
commitd4e493caf788ef44982e131ff9c786546904d934 (patch)
tree04c72e6d295ff6b222c2991ff4b87d16d651443b /fs/cifs/cifsfs.h
parenteccbe858ce6412b96fc7cb32eb23a3592f64e5f6 (diff)
Linux-libre 4.4.5-gnupck-4.4.5-gnu
Diffstat (limited to 'fs/cifs/cifsfs.h')
-rw-r--r--fs/cifs/cifsfs.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index c3cc16090..44b3d4280 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -31,19 +31,15 @@
* so that it will fit. We use hash_64 to convert the value to 31 bits, and
* then add 1, to ensure that we don't end up with a 0 as the value.
*/
-#if BITS_PER_LONG == 64
static inline ino_t
cifs_uniqueid_to_ino_t(u64 fileid)
{
+ if ((sizeof(ino_t)) < (sizeof(u64)))
+ return (ino_t)hash_64(fileid, (sizeof(ino_t) * 8) - 1) + 1;
+
return (ino_t)fileid;
+
}
-#else
-static inline ino_t
-cifs_uniqueid_to_ino_t(u64 fileid)
-{
- return (ino_t)hash_64(fileid, (sizeof(ino_t) * 8) - 1) + 1;
-}
-#endif
extern struct file_system_type cifs_fs_type;
extern const struct address_space_operations cifs_addr_ops;