From patchwork Mon May 7 08:37:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 10383589 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 57B7960159 for ; Mon, 7 May 2018 08:47:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45A39286DF for ; Mon, 7 May 2018 08:47:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AB7128A96; Mon, 7 May 2018 08:47:09 +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=unavailable 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 EDEA8286DF for ; Mon, 7 May 2018 08:47:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbeEGIqJ (ORCPT ); Mon, 7 May 2018 04:46:09 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33700 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbeEGIig (ORCPT ); Mon, 7 May 2018 04:38:36 -0400 Received: by mail-wr0-f196.google.com with SMTP id o4-v6so27841766wrm.0 for ; Mon, 07 May 2018 01:38:36 -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=oFFdWsFwX1F7B7FRYGZTu7nULjQ/n3yOjDTvMtxxk/M=; b=Fdebm93kP7ZS7f6vhRN4q2c3sPrJ+jwy3TTspgCbShPnq0WnLZj4x4u69A2pI5llnS BYEk7RrSenartyGFPydf8hQjQa0TPJWIRe5R5+vUnutnsKwFCPkOr5F4QjC0GiGOKQDG TfOYv40/CdOtyWCm4YJTfDNs7Vkjqf3l/AwJ3Ss3YX6Njyo22bZb/AmABOhy5R/CAgSq oivYbENOA82qfOdhkCZbP6PlLSb8gaobZdep2486oasW+V8by0rgDJia8eQkBU/ULkUa 1cw9SPt1bRE1kphOO3/TrFzwQOd56/MmELUKnvfMYkTlupcaWFxRGnXE4a3QW34GlbFe UNFA== X-Gm-Message-State: ALQs6tCfjpHsJm96LSKsb7ns7cvO3p+14Rqbtzh1zhzsCza2YcHitTQJ sUDLfGgSGUsXUvk8xJ+b9GcECg== X-Google-Smtp-Source: AB8JxZqFmPRtFMyz8NXJviXX9B+lUorc/5YECLUshiH714Sg+tU9A6RGiwVc0wMDv5rUcGKqS++rGg== X-Received: by 2002:adf:adf0:: with SMTP id w103-v6mr30793279wrc.101.1525682315491; Mon, 07 May 2018 01:38:35 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (C2B0E321.catv.pool.telekom.hu. [194.176.227.33]) by smtp.gmail.com with ESMTPSA id h8-v6sm5908050wmc.16.2018.05.07.01.38.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 May 2018 01:38:35 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 20/35] ovl: add O_DIRECT support Date: Mon, 7 May 2018 10:37:52 +0200 Message-Id: <20180507083807.28792-21-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180507083807.28792-1-mszeredi@redhat.com> References: <20180507083807.28792-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 2028f6886649..ce871a15e185 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;