diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 481f8892a919..58d44057813e 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -203,8 +203,10 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) | |||
203 | * Note: assumes we have exclusive access to this mapping either | 203 | * Note: assumes we have exclusive access to this mapping either |
204 | * through inode->i_mutex or some other mechanism. | 204 | * through inode->i_mutex or some other mechanism. |
205 | */ | 205 | */ |
206 | if (page->index == 0) | 206 | if (page->index == 0 && invalidate_inode_pages2_range(inode->i_mapping, PAGE_CACHE_SIZE, -1) < 0) { |
207 | invalidate_inode_pages2_range(inode->i_mapping, PAGE_CACHE_SIZE, -1); | 207 | /* Should never happen */ |
208 | nfs_zap_mapping(inode, inode->i_mapping); | ||
209 | } | ||
208 | unlock_page(page); | 210 | unlock_page(page); |
209 | return 0; | 211 | return 0; |
210 | error: | 212 | error: |