Received: by 10.192.165.148 with SMTP id m20csp2521845imm; Sun, 22 Apr 2018 08:46:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Xkw863hS2yuUoYnpZEo55D4eh/KR3RXVlzk6R6GnU40Ta/hPTHN6Gq71N1Jq7xWJN5D0g X-Received: by 2002:a17:902:9890:: with SMTP id s16-v6mr17850263plp.132.1524411996674; Sun, 22 Apr 2018 08:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524411996; cv=none; d=google.com; s=arc-20160816; b=N/IKjcsXYltJjKQzaZbU8ChuEicCaEkNG+eUKrJKqqkK6XFh9j2zQ9nMDfnbPWCqpO iYuTngreZPt9RC60RNPNPCBrcR63Q/Zd//jgG+aBqGRJFiSuuKlYfyEps+9t5gNGU9Vh zfDfoZ9GpGgYgfKDO6Mp/0jfn9YIpNSZ68KhMhQqoZDZidXlvci/odgpMEkb52enCdcB N2A2QXjGMF8YbKBgG3341FE1CCPsYTFhnec1CL0qRwKCoXoSNTvTybsMIUJ/J06q802y awntOmSfAEc8FJRz7VprtUGFRso7U4uJUo2auKwilboJXesBEApIya0OFoDXIRv+2sY2 Y1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/gXfpYgnOo+2oq4w1iSnhtRuJ0W6iLTW54BKxZl62Fs=; b=keooDXl2B41peYK6QZ2ovBOoa3qsVVG03SlF0l/ga/fykAh3eCX7UdfFtRGMV707WC UEBhybg3sVb+Jbxex64a1fhlXmslGruRMJzdaPxngA/r44v8O03e8FjzhNC+3ZCRhzWO FR+pCnnB/Dt7P9R2BiR8SkCNGcxPPi1dSawLcZYLCEZod8KwWWMpFXoho1P7GNoR8lC0 YB3LaGR7EUbpxrJ4hj1AKTpbCbAjcvOyF9UrDdypKuioN8Tm9pp7K8mYzrLXQNBYfqOu A6kJ3GfVFe9hE4JVTmaGzKtrXR+BfGkoJ8dGygQEW68KFErLLuYubiL3BtJ2INrq6qL5 uVNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si7156676pgs.304.2018.04.22.08.46.22; Sun, 22 Apr 2018 08:46:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755183AbeDVPoA (ORCPT + 99 others); Sun, 22 Apr 2018 11:44:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48964 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754962AbeDVODB (ORCPT ); Sun, 22 Apr 2018 10:03:01 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 703AECEC; Sun, 22 Apr 2018 14:03:00 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Jiang , Dan Williams Subject: [PATCH 4.16 191/196] device-dax: allow MAP_SYNC to succeed Date: Sun, 22 Apr 2018 15:53:31 +0200 Message-Id: <20180422135114.135122549@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 capability. 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 #include #include +#include #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)