summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 38d1e7b976d..cdbd20e62bb 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6777,8 +6777,10 @@ bool btrfs_page_exists_in_range(struct inode *inode, loff_t start, loff_t end)
break; /* TODO: Is this relevant for this use case? */
}
- if (!page_cache_get_speculative(page))
+ if (!page_cache_get_speculative(page)) {
+ page = NULL;
continue;
+ }
/*
* Has the page moved?