ext4: fix prefetchw of NULL page
authorLiu Xiang <liu.xiang6@zte.com.cn>
Sun, 7 Apr 2019 15:54:27 +0000 (11:54 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 7 Apr 2019 15:54:27 +0000 (11:54 -0400)
commitd454a27384f6eb05904a59d1607461b7ad312aa9
tree691f6aca919e9a53777be7cbffeb3b87c694c314
parent742b06b5628f2cd23cb51a034cb54dc33c6162c5
ext4: fix prefetchw of NULL page

In ext4_mpage_readpages(), if the parameter pages is not NULL, another
parameter page is NULL. At the first time prefetchw(&page->flags)
works on NULL. From second time, prefetchw(&page->flags) always works on
the last consumed page. This might do little improvment for handling
current page. So prefetchw() should be called while the page pointer
has just been updated.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/readpage.c