diff options
Diffstat (limited to 'mm/readahead.c')
| -rw-r--r-- | mm/readahead.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 337b20e946f6..dfa9a1a03a11 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
| 12 | #include <linux/gfp.h> | ||
| 12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
| 13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 14 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
| @@ -502,7 +503,7 @@ void page_cache_sync_readahead(struct address_space *mapping, | |||
| 502 | return; | 503 | return; |
| 503 | 504 | ||
| 504 | /* be dumb */ | 505 | /* be dumb */ |
| 505 | if (filp->f_mode & FMODE_RANDOM) { | 506 | if (filp && (filp->f_mode & FMODE_RANDOM)) { |
| 506 | force_page_cache_readahead(mapping, filp, offset, req_size); | 507 | force_page_cache_readahead(mapping, filp, offset, req_size); |
| 507 | return; | 508 | return; |
| 508 | } | 509 | } |
