Skip to content

Commit

Permalink
Merge pull request hardkernel#23 from drkhsh-wrk/khadas-vims-4.9.y
Browse files Browse the repository at this point in the history
mm/readahead: Fix null pointer
  • Loading branch information
numbqq authored Jul 17, 2020
2 parents 4c96315 + b284914 commit 40178b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ int __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
gfp_t gfp_mask = readahead_gfp_mask(mapping);

#ifdef CONFIG_AMLOGIC_CMA
if (filp->f_mode & (FMODE_WRITE | FMODE_WRITE_IOCTL))
if (filp && (filp->f_mode & (FMODE_WRITE | FMODE_WRITE_IOCTL)))
gfp_mask |= __GFP_WRITE;
#endif /* CONFIG_AMLOGIC_CMA */

Expand Down

0 comments on commit 40178b4

Please sign in to comment.