Message ID | 1457483050-23855-1-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 6d627b9..eeed6d1 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -538,9 +538,7 @@ extern int nfs_readpage_async(struct nfs_open_context *, struct 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