diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-03-18 12:02:43 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-03-18 12:02:43 +0800 |
commit | 241bca50dd1ae71a7cd7eebe579bd131bf986167 (patch) | |
tree | f9d4af30aefba27b3c00074d935f8b5b01d54939 /fs/cifs/cifsfs.h | |
parent | 1ebca975cbc0ab4708126e26bf2729777184f1e6 (diff) | |
parent | 5cc3b58828a8bb2ebb34de96d1aec1564f912a31 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-androidlsk-v4.1-16.03-android
Diffstat (limited to 'fs/cifs/cifsfs.h')
-rw-r--r-- | fs/cifs/cifsfs.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 252f5c15806b..78a7b1d73354 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; |