From patchwork Thu Feb 4 14:02:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 8222001 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B23CB9F37A for ; Thu, 4 Feb 2016 14:02:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C624720394 for ; Thu, 4 Feb 2016 14:02:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AB8D20397 for ; Thu, 4 Feb 2016 14:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932465AbcBDOCJ (ORCPT ); Thu, 4 Feb 2016 09:02:09 -0500 Received: from mail-lb0-f179.google.com ([209.85.217.179]:34424 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473AbcBDOCH (ORCPT ); Thu, 4 Feb 2016 09:02:07 -0500 Received: by mail-lb0-f179.google.com with SMTP id cw1so31608214lbb.1; Thu, 04 Feb 2016 06:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:mime-version:content-type:subject:in-reply-to :user-agent:date:message-id; bh=f7XrSbNaJXeM+vUWhU8MK/hUc6+xWPnb4TN81jrpD7I=; b=TbaPPQrYaP409Q9p0ezeaesI3XhlbZiD8WgJ30EtEn8MZEOGKmSJQpq90EXTO42EZT RDQvO+xYSkTOM/QjcdcXO3CR3dWUwZaU/mv1XJO0R+sCl4CM+GI37IGq3skehmBapidf +SWMMMmo9S8CLs5Ttu4k4enwkGuog6RRdbO1Nr7OjyhWPt+GgKNSuLVfWlLn1W+Vsx+D B90C4a3alforAhSLexGLChB/fYUtinekqoGTP+bV1Fun70a5Utj/JvPw8smv5yBVF2H9 3ntI69S2GgCks4lgDdn+xXY7cBVuDNOGVrmZGhtGhacATBHrMChsvMmgA9GDeYLA2RFG 6x/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:mime-version:content-type :subject:in-reply-to:user-agent:date:message-id; bh=f7XrSbNaJXeM+vUWhU8MK/hUc6+xWPnb4TN81jrpD7I=; b=mFJKHbNll1kh6eVt6kz6/zn+b2J9miCE/lR4ijX12evhlc2KSf8OpWnQ52MJfSXUgB Z5COXLMI3TAwS6MuPgpKYenqIg2zV7CqcX7qYMonDp9DNTEYxWcyvRWm11NFkS6XhptY uxsTIubT2LZ0ATPMUQfASysoUzV41jMf00l6fIeG/PcGz2rFGTGDSrR/+ZeYrT1tCMaI Z8w2XFoGRxXWKBXI3jAxy5xEYSFJf9tcZSYOa12o3UaD8+W6OQRtzoqBsTO3xOQy0EdK eP8BGi3IsL0ixmyBOK2i/BK4iIWLyYgnC7VlSlAOBNKa7dql+zQl3dWb3T4wJVwH4dC3 TYAg== X-Gm-Message-State: AG10YOS8s2mbLM0v001/xewlZwiJ7zHTd3PFH1EiaYIf/LKnKPi1bz4Fo3SqMiM5Ix0wsQ== X-Received: by 10.112.147.1 with SMTP id tg1mr2979000lbb.119.1454594524952; Thu, 04 Feb 2016 06:02:04 -0800 (PST) Received: from smtp.gmail.com ([195.214.234.4]) by smtp.gmail.com with ESMTPSA id l129sm1579172lfl.37.2016.02.04.06.02.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2016 06:02:04 -0800 (PST) From: Dmitry Monakhov To: Ross Zwisler Cc: "linux-kernel\@vger.kernel.org" , "H. Peter Anvin" , "J. Bruce Fields" , Theodore Ts'o , Alexander Viro , Andreas Dilger , Dave Chinner , Ingo Molnar , Jan Kara , Jeff Layton , Matthew Wilcox , Thomas Gleixner , linux-ext4 , linux-fsdevel , Linux MM , "linux-nvdimm\@lists.01.org" , X86 ML , XFS Developers , Andrew Morton , Matthew Wilcox , Dave Hansen MIME-Version: 1.0 Subject: [PATCH] dax: dirty inode only if required In-Reply-To: 1450899560-26708-5-git-send-email-ross.zwisler@linux.intel.com User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 04 Feb 2016 17:02:02 +0300 Message-ID: <87k2mkr2ud.fsf@openvz.org> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Dmitry Monakhov Reviewed-by: Jan Kara Reviewed-by: Ross Zwisler --- fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index e0e9358..fc2e314 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -358,7 +358,8 @@ static int dax_radix_entry(struct address_space *mapping, pgoff_t index, void *entry; WARN_ON_ONCE(pmd_entry && !dirty); - __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); + if (dirty) + __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); spin_lock_irq(&mapping->tree_lock);