提交 9eaa67c6 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

NFS: Clean-up: use correct type when converting NFS blocks to local blocks

inode->i_blocks is a blkcnt_t these days, which can be a u64 or unsigned
long, depending on the setting of CONFIG_LSF.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 433c9237
......@@ -183,9 +183,9 @@ unsigned long nfs_block_bits(unsigned long bsize, unsigned char *nrbitsp)
/*
* Calculate the number of 512byte blocks used.
*/
static inline unsigned long nfs_calc_block_size(u64 tsize)
static inline blkcnt_t nfs_calc_block_size(u64 tsize)
{
loff_t used = (tsize + 511) >> 9;
blkcnt_t used = (tsize + 511) >> 9;
return (used > ULONG_MAX) ? ULONG_MAX : used;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册