mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
mm: Protect readahead size from init
Change-Id: I1f105969bcdd756cd68e8692fb3419aa72b07b5e Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
58d4ee9072
commit
42095c444c
@ -106,6 +106,9 @@ queue_ra_store(struct request_queue *q, const char *page, size_t count)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (!strcmp(current->comm, "init"))
|
||||
ra_kb = VM_MAX_READAHEAD;
|
||||
|
||||
q->backing_dev_info->ra_pages = ra_kb >> (PAGE_SHIFT - 10);
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user