From patchwork Thu Apr 12 15:08:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 10338759 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 9E1CE602D8 for ; Thu, 12 Apr 2018 15:17:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 944A42434C for ; Thu, 12 Apr 2018 15:17:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8916425D9E; Thu, 12 Apr 2018 15:17:43 +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 60C492434C for ; Thu, 12 Apr 2018 15:17:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbeDLPMq (ORCPT ); Thu, 12 Apr 2018 11:12:46 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38609 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644AbeDLPJD (ORCPT ); Thu, 12 Apr 2018 11:09:03 -0400 Received: by mail-wr0-f194.google.com with SMTP id l13so4425154wrb.5 for ; Thu, 12 Apr 2018 08:09:02 -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=yGeWXQdU+PKSAvgvV1MrYTtLhzrSyiGAu8XyHaXNYzw=; b=aHA9SL7eE5wWyUGW7RPpT74oIBR1lRBlhC3Siny45xGaoYC/+g8DP5rsisHJFshAol /S9mnGnKPQFv07ueS6iQzuE7ijSwGyLu7nzmhEKVtfS7DC/pUeSTrHsov8bwxOwgfjsg EnEKGz9ifPXbTLCxO6crsiRXoexPOXVHrS0t5UFcRiTOGIvpE6ts6Z9NrzMcUvMyYIAz lIGaz+CJaFHfBqlQpoG4LFpXY8SDiu6pkFCboKCBboYic5WLPkPdWy/stN1bmbQB0blh NXgzedJelvFD90NmLzoOfOlg2/0tAm0YhtrmjP9TF2ouedOixCk6zDdjX60a8L0Gmkbp ++xQ== X-Gm-Message-State: ALQs6tCVNUwE1+NpNQwO0ay/DmNWQPNFvR1BLKUHUYNB+1qylHxherub UqIHnbd6ASNS2Lb3uhqmSd4nAjyKNcY= X-Google-Smtp-Source: AIpwx49at+pmMKEN2KD3r3oZxN5TZzXjphCVW1HiOFF31yIDftUC7TnXjQkDlEARNyPi32lbRsRykg== X-Received: by 10.223.142.244 with SMTP id q107mr1114278wrb.64.1523545741922; Thu, 12 Apr 2018 08:09:01 -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.09.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 08:09:01 -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 26/35] Revert "ovl: fix may_write_real() for overlayfs directories" Date: Thu, 12 Apr 2018 17:08:17 +0200 Message-Id: <20180412150826.20988-27-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 This reverts commit 954c736f865d6c0c68ae4263a2f3502ee7c447a3. Overlayfs no longer relies on the vfs for checking writability of files. Signed-off-by: Miklos Szeredi --- fs/namespace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 9d1374ab6e06..9ec9bf74116b 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -468,9 +468,7 @@ static inline int may_write_real(struct file *file) /* File refers to upper, writable layer? */ upperdentry = d_real(dentry, NULL, 0, D_REAL_UPPER); - if (upperdentry && - (file_inode(file) == d_inode(upperdentry) || - file_inode(file) == d_inode(dentry))) + if (upperdentry && file_inode(file) == d_inode(upperdentry)) return 0; /* Lower layer: can't write to real file, sorry... */