[lkml]   [2018]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 4.16 191/196] device-dax: allow MAP_SYNC to succeed
    4.16-stable review patch.  If anyone has any objections, please let me know.


    From: Dave Jiang <>

    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

    Cc: <>
    Fixes: b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags")
    Signed-off-by: Dave Jiang <>
    Reviewed-by: Dan Williams <>
    Signed-off-by: Dan Williams <>
    Signed-off-by: Greg Kroah-Hartman <>

    drivers/dax/device.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/drivers/dax/device.c
    +++ b/drivers/dax/device.c
    @@ -19,6 +19,7 @@
    #include <linux/dax.h>
    #include <linux/fs.h>
    #include <linux/mm.h>
    +#include <linux/mman.h>
    #include "dax-private.h"
    #include "dax.h"

    @@ -534,6 +535,7 @@ static const struct file_operations dax_
    .release = dax_release,
    .get_unmapped_area = dax_get_unmapped_area,
    .mmap = dax_mmap,
    + .mmap_supported_flags = MAP_SYNC,

    static void dev_dax_release(struct device *dev)

     \ /
      Last update: 2018-04-22 17:44    [W:2.436 / U:0.540 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site