mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
readahead: fix NULL filp dereference
btrfs relocate_file_extent_cluster() calls us with NULL filp: [ 4005.426805] BUG: unable to handle kernel NULL pointer dereference at 00000021 [ 4005.426818] IP: [<c109a130>] page_cache_sync_readahead+0x18/0x3e Signed-off-by: Wu Fengguang <[email protected]> Cc: Yan Zheng <[email protected]> Reported-by: Kirill A. Shutemov <[email protected]> Tested-by: Kirill A. Shutemov <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
12765517d9
commit
70655c06bd
1 changed files with 1 additions and 1 deletions
|
|
@ -503,7 +503,7 @@ void page_cache_sync_readahead(struct address_space *mapping,
|
|||
return;
|
||||
|
||||
/* be dumb */
|
||||
if (filp->f_mode & FMODE_RANDOM) {
|
||||
if (filp && (filp->f_mode & FMODE_RANDOM)) {
|
||||
force_page_cache_readahead(mapping, filp, offset, req_size);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue