diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index db5d96dc6107d5cb8b21235963fd4a950728401f..cd0e57f3a00fe1a2641cd9de13917f81291be2dd 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -814,8 +814,9 @@ static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) if (S_ISDIR(inode->i_mode)) nfsi->cache_validity |= NFS_INO_INVALID_DATA; } - if (inode->i_size == fattr->pre_size && nfsi->npages == 0) - inode->i_size = fattr->size; + if (inode->i_size == nfs_size_to_loff_t(fattr->pre_size) && + nfsi->npages == 0) + inode->i_size = nfs_size_to_loff_t(fattr->size); } }