Message ID | 1457565265-15195-72-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 4899737..d3c0bbe 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -589,9 +589,7 @@ static inline void nfs3_forget_cached_acls(struct inode *inode) static inline loff_t nfs_size_to_loff_t(__u64 size) { - if (size > (__u64) OFFSET_MAX - 1) - return OFFSET_MAX - 1; - return (loff_t) size; + return min_t(u64, size, OFFSET_MAX); } static inline ino_t