From patchwork Thu Apr 12 15:08:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 10338773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9268F604D4 for ; Thu, 12 Apr 2018 15:18:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8668226E90 for ; Thu, 12 Apr 2018 15:18:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B10A27968; Thu, 12 Apr 2018 15:18:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1482426E90 for ; Thu, 12 Apr 2018 15:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753540AbeDLPI5 (ORCPT ); Thu, 12 Apr 2018 11:08:57 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36162 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753423AbeDLPIx (ORCPT ); Thu, 12 Apr 2018 11:08:53 -0400 Received: by mail-wm0-f68.google.com with SMTP id x82so10193857wmg.1 for ; Thu, 12 Apr 2018 08:08:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pAO4MPSGmrjEEGe9Mq1NAiu8OuSuM30SvLNUx27T8BU=; b=H5uJW1SYyPV2dDCcLoRRxh7HaNK61zILb5dVp2iqZh81hKDBB9s93ho5tcIeHa/GET dGMVX7IVj94kzn/qg1Rrm05zVvFTscEVKB/tmvgAEOE1ta4sHCdmAN0bJZOaCGZqbhPW rMF8AVpjMwkHLpz5X5VkDV8AHPtX0JAhoGyacY0twbUuoglkyGLfT26Xt49KFW40XBk6 PR8tF3c2H5YIoYaSWfScRjwuUdDr8unXfPo3qzEE/KiN+0tsAud55YOXTBhBHnzyJWVs cA0viW+IviWpZiWM5HcdMsrGildHBeTEiBTVSVStCg+j1WObHuAshKpbT3YrHsYtYkXF ja/w== X-Gm-Message-State: ALQs6tB+AU+v3VmopcZe+gvAd+cXitPOM14DuCYNF8+dV+Awefp/0kb7 vQppxjwdR4mASFRGU5sJzUoomw== X-Google-Smtp-Source: AIpwx49R7H4VaSTMD5E/Z6jM6nPFYT2C+a7YtqWuBzGIDbnccP5gP6JRtJo8Rurny8wsA1JpBwdILw== X-Received: by 10.28.54.220 with SMTP id y89mr1017448wmh.108.1523545732510; Thu, 12 Apr 2018 08:08:52 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-176-63-54-97.catv.broadband.hu. [176.63.54.97]) by smtp.gmail.com with ESMTPSA id p197sm2621783wme.43.2018.04.12.08.08.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 08:08:52 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 18/35] ovl: readd O_DIRECT support Date: Thu, 12 Apr 2018 17:08:09 +0200 Message-Id: <20180412150826.20988-19-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180412150826.20988-1-mszeredi@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index cc004ff1b05b..9670e160967e 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -110,6 +110,9 @@ static int ovl_open(struct inode *inode, struct file *file) if (IS_ERR(realfile)) return PTR_ERR(realfile); + /* For O_DIRECT dentry_open() checks f_mapping->a_ops->direct_IO */ + file->f_mapping = realfile->f_mapping; + file->private_data = realfile; return 0;