]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: Handle MADV_WILLNEED through vfs_fadvise()
authorJan Kara <jack@suse.cz>
Thu, 29 Aug 2019 16:04:11 +0000 (09:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:14:15 +0000 (13:14 +0200)
commitb56335c486f733c12cedd7de59ca131f022022ba
treec19983a210c31662e17656ed4f06d505fd03a8d8
parenta775ad97ce7720bf94a703008d611a007e4423b7
mm: Handle MADV_WILLNEED through vfs_fadvise()

commit 692fe62433d4ca47605b39f7c416efd6679ba694 upstream.

Currently handling of MADV_WILLNEED hint calls directly into readahead
code. Handle it by calling vfs_fadvise() instead so that filesystem can
use its ->fadvise() callback to acquire necessary locks or otherwise
prepare for the request.

Suggested-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Boaz Harrosh <boazh@netapp.com>
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/madvise.c