Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp289757ybk; Tue, 19 May 2020 23:01:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnfnRjIm/l5BJrRxsv+tD6tPQoLuztWFpE+A+I6j2RLx2x/7vb1EA1xOQwD3qzqJ2Y4ZrP X-Received: by 2002:a17:906:3e96:: with SMTP id a22mr2369249ejj.232.1589954507419; Tue, 19 May 2020 23:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589954507; cv=none; d=google.com; s=arc-20160816; b=HhcuUbeuag0xofrKhcaFo7gXO3MScxj3Mln0tD8etV5/Gz/DRDPI2Jg/I5GkL8uXms f+Bg0vtA1tqjn5XjodMFnNvvAPEAM7cBUK0l2Hjmenbly1TYwzuuyjqsBev/ZmMx/HU5 JJXDKKbVKw2lGxJcqQlj5SHv2tvR7cUm6hskipL8VHDFwQkKxzopffsoQVijmYHiDOut wP+ymbYL0lRnBMqtaDsbOWsVYX5vK7Yiwo7STP6t1G51ZMofOLcsixRjkaUnSrmhpeOM NMLjgIAN+L1Wq/HUv9jCPxIaufSE0yqfy5aj+kT5L0ojQ1o4EIE3dnGDfyCHw1zQiC6S U2xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=A8W8mJLUl4JO2+IAZojgF8VVvvkSIee7FD8LVpbcQVc=; b=RZgrXPAISTPZYBMOnlcjPZXzVeQGA0rAirp8FGFPBu1/xc9LFWmdYugNpnDk3nfOu+ hUrrPYkVYLEENZMZbn9TSQe4zvC0tdh1Uv3NEK9vW2wVaxsiXkKj1V1UENVgH1CmeEUQ KKbqsLwTNEn/Y3mhVdawowIxb8iCe625JrIIbWHxf1hiKMYYBpuG9d+OLvRvi8YLgdeK VThTY4+aMQWnuz4UcQC03fPcuDwt9wbe6/95/TJQZWD2sNnr7ZYomG0wFzXCr/yFOb5g 9p1s0jjSucl7ZLp522xC1SMXt6USxWmKJH5xVlp1ESkp6WcAU69vPk4m7lq6Zwd1ewpi dCeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si1211673ejb.668.2020.05.19.23.01.24; Tue, 19 May 2020 23:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbgETF6d (ORCPT + 99 others); Wed, 20 May 2020 01:58:33 -0400 Received: from mga03.intel.com ([134.134.136.65]:44593 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbgETF55 (ORCPT ); Wed, 20 May 2020 01:57:57 -0400 IronPort-SDR: 1xJUSG0OpHVpPe7aD/x2MIC3VnTwj0elccCAGEhtSfqf4u46eLozy6bN4gvqQh3ZDBoWtZZ+Bb VPHeHRk88Kng== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 22:57:56 -0700 IronPort-SDR: w6ZWGQdmiZeztBN3K7PqBdorDe0GHJpci/0w4kFLuf2sdpN6w9YdoDe3Bb0YmfODN+wjmRlbPj d2W8xtHGGJ+w== X-IronPort-AV: E=Sophos;i="5.73,412,1583222400"; d="scan'208";a="253579716" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 22:57:56 -0700 From: ira.weiny@intel.com To: linux-ext4@vger.kernel.org, Andreas Dilger , "Theodore Y. Ts'o" , Jan Kara , Eric Biggers Cc: Ira Weiny , Al Viro , Dan Williams , Dave Chinner , Christoph Hellwig , Jeff Moyer , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 1/8] fs/ext4: Narrow scope of DAX check in setflags Date: Tue, 19 May 2020 22:57:46 -0700 Message-Id: <20200520055753.3733520-2-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200520055753.3733520-1-ira.weiny@intel.com> References: <20200520055753.3733520-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny When preventing DAX and journaling on an inode. Use the effective DAX check rather than the mount option. This will be required to support per inode DAX flags. Reviewed-by: Jan Kara Signed-off-by: Ira Weiny --- fs/ext4/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index bfc1281fc4cb..5813e5e73eab 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -393,9 +393,9 @@ static int ext4_ioctl_setflags(struct inode *inode, if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) { /* * Changes to the journaling mode can cause unsafe changes to - * S_DAX if we are using the DAX mount option. + * S_DAX if the inode is DAX */ - if (test_opt(inode->i_sb, DAX)) { + if (IS_DAX(inode)) { err = -EBUSY; goto flags_out; } -- 2.25.1