]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
device-dax: allow MAP_SYNC to succeed
authorDave Jiang <dave.jiang@intel.com>
Thu, 19 Apr 2018 20:39:43 +0000 (13:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:43:10 +0000 (09:43 +0200)
commit86d04eb7ecf1dec069e52e0e82f68943703fa08a
treee12bf204010ec03371ca51c929fd2f776fb9ae64
parente5872ce01019ccd9cb383a1463366e0b5a443960
device-dax: allow MAP_SYNC to succeed

commit ef8423022324cf79bd1b41d8707c766461e7e555 upstream.

MAP_SYNC is a nop for device-dax. Allow MAP_SYNC to succeed on device-dax
to eliminate special casing between device-dax and fs-dax as to when the
flag can be specified. Device-dax users already implicitly assume that they do
not need to call fsync(), and this enables them to explicitly check for this
capability.

Cc: <stable@vger.kernel.org>
Fixes: b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dax/device.c