diff options
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 4f46f7a05289..77fec6a55f57 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
@@ -812,7 +812,7 @@ static u64 pnfs_num_cont_bytes(struct inode *inode, pgoff_t idx) | |||
812 | 812 | ||
813 | /* Optimize common case that writes from 0 to end of file */ | 813 | /* Optimize common case that writes from 0 to end of file */ |
814 | end = DIV_ROUND_UP(i_size_read(inode), PAGE_CACHE_SIZE); | 814 | end = DIV_ROUND_UP(i_size_read(inode), PAGE_CACHE_SIZE); |
815 | if (end != NFS_I(inode)->npages) { | 815 | if (end != inode->i_mapping->nrpages) { |
816 | rcu_read_lock(); | 816 | rcu_read_lock(); |
817 | end = page_cache_next_hole(mapping, idx + 1, ULONG_MAX); | 817 | end = page_cache_next_hole(mapping, idx + 1, ULONG_MAX); |
818 | rcu_read_unlock(); | 818 | rcu_read_unlock(); |