From patchwork Sat May 14 00:02:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Derrick X-Patchwork-Id: 9094211 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F32FCBF29F for ; Sat, 14 May 2016 00:04:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A3822017E for ; Sat, 14 May 2016 00:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EEE6F20220 for ; Sat, 14 May 2016 00:04:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932274AbcENAEa (ORCPT ); Fri, 13 May 2016 20:04:30 -0400 Received: from mga04.intel.com ([192.55.52.120]:34601 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932178AbcENAE3 (ORCPT ); Fri, 13 May 2016 20:04:29 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 13 May 2016 17:04:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,615,1455004800"; d="scan'208";a="976113478" Received: from eremita.lm.intel.com ([10.232.112.176]) by orsmga002.jf.intel.com with ESMTP; 13 May 2016 17:04:06 -0700 From: Jon Derrick To: linux-block@vger.kernel.org Cc: Jon Derrick , "Jens Axboe" , "Alexander Viro" , linux-fsdevel@vger.kernel.org, "Dan Williams" , "Jeff Moyer" , "Stephen Bates" , "Keith Busch" , linux-nvme@lists.infradead.org, "Christoph Hellwig" Subject: [RFCv2 1/3] block: allow other bd i_node flags when DAX is disabled Date: Fri, 13 May 2016 18:02:46 -0600 Message-Id: <1463184168-3381-2-git-send-email-jonathan.derrick@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1463184168-3381-1-git-send-email-jonathan.derrick@intel.com> References: <1463184168-3381-1-git-send-email-jonathan.derrick@intel.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 When DAX is not compiled into the kernel or the device does not support direct-access, the block device file's inode flags are fully cleared. This patch changes it to only clear the S_DAX flag when DAX is disabled. This reverts to i_flags behavior prior to bbab37ddc20bae4709bca8745c128c4f46fe63c5 Signed-off-by: Jon Derrick --- fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 20a2c02..d4fa725 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1208,7 +1208,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) if (IS_ENABLED(CONFIG_BLK_DEV_DAX) && disk->fops->direct_access) bdev->bd_inode->i_flags = S_DAX; else - bdev->bd_inode->i_flags = 0; + bdev->bd_inode->i_flags &= ~S_DAX; if (!partno) { ret = -ENXIO;