aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKOSAKI Motohiro <[email protected]>2012-07-31 16:42:50 -0700
committerLinus Torvalds <[email protected]>2012-07-31 18:42:42 -0700
commit3d3727cdb07ff17ddc3c551ef8d03d37b60a0372 (patch)
treec38036b00a6863a376cc592bc7d87a7560cb800d /include/linux
parentc59e26104e3e0e952cd7d63e79cd71ee5a9ec25a (diff)
mm, fadvise: don't return -EINVAL when filesystem cannot implement fadvise()
Eric Wong reported his test suite failex when /tmp is tmpfs. https://lkml.org/lkml/2012/2/24/479 Currentlt the input check of POSIX_FADV_WILLNEED has two problems. - requires a_ops->readpage. But in fact, force_page_cache_readahead() requires that the target filesystem has either ->readpage or ->readpages. - returns -EINVAL when the filesystem doesn't have ->readpage. But posix says that fadvise is merely a hint. Thus fadvise() should return 0 if filesystem has no means of implementing fadvise(). The userland application should not know nor care whcih type of filesystem backs the TMPDIR directory, as Eric pointed out. There is nothing which userspace can do to solve this error. So change the return value to 0 when filesytem doesn't support readahead. [[email protected]: checkpatch fixes] Signed-off-by: KOSAKI Motohiro <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Hillf Danton <[email protected]> Signed-off-by: Eric Wong <[email protected]> Tested-by: Eric Wong <[email protected]> Reviewed-by: Wanlong Gao <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions