Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3992630imu; Mon, 10 Dec 2018 11:10:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjRM+wY2jD+2HT2zmjICc9PJT/2iN/Pc7Dx9H7T010n/odf1iX5QJOWhNhP6uCMy6tEEuA X-Received: by 2002:a65:5a4c:: with SMTP id z12mr11871300pgs.188.1544469027083; Mon, 10 Dec 2018 11:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544469027; cv=none; d=google.com; s=arc-20160816; b=wd3Hy5CL4GFg6e/el6Lff6YQDnWIsHy8G8f5mwdOUf6tu3jWj6ojlwlsSkmOeqA2aH 8k0/udZNKGL0jvs/5O1huH17y1v+jqG+e4zBjATrTbsmheuZU7HOuVvjv5sklHpwq4Db osv43gZoGrO+63+XlRmpVDB6zib8cW2A0dG7Qfo3L471k0um25jUaej2pJmFxai0Yk0o oeqTtXcxnuQsBQh/I2YM0QnUa2qzMfvil4hE3KrzvJ6ueMXGSPQXNT+H/Vb2qeCljFiR tBznYe9Up6EiqthRsQSxGWDePK6KCtFGxBD7FEeoEUYs+TYQ/FGWpsX+kF0RQy1PllOc ItuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=K5v8A3Z4dEWhCBZn2T97qhcyZtujPrg3LY0Vw6GW8+k=; b=kpzrvdWoH5oJv3s95GnhQDf5uUOGIWExMdkYEuPoCGAcmGzuQThIleDiMqQS4M+mJ4 7CwRdxbSFxlaVFhdgdFA75NB3VzfcOkOjQDeWeTww6uUvbC0GLUdzhcesEEKaYuI9jQD WMtBDnLTS31UXt29DmHqHTz4uDd+dnsfZEOdEh0ib0OEf6gaj1S/Re4cZFjlW6TbPDA+ ymmvXbYDJ4epH04uZ95QBxUYks+VlhnO7hWZbYveFvZwX5dHfxHOh6eGVlmBDqShKKkW FKiAN4sivVBwFRQrmps2fokY8L21YjUSn1JlU2WT+rNERxdO7wiMhMg6ZY53ogBMBceP tTDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si8442686pfb.31.2018.12.10.11.10.11; Mon, 10 Dec 2018 11:10:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728883AbeLJRQj (ORCPT + 99 others); Mon, 10 Dec 2018 12:16:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41360 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbeLJRNg (ORCPT ); Mon, 10 Dec 2018 12:13:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49A5B3082E5F; Mon, 10 Dec 2018 17:13:36 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.234]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE320605C5; Mon, 10 Dec 2018 17:13:35 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id DCCA1224281; Mon, 10 Dec 2018 12:13:30 -0500 (EST) From: Vivek Goyal To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: vgoyal@redhat.com, miklos@szeredi.hu, stefanha@redhat.com, dgilbert@redhat.com, sweil@redhat.com, swhiteho@redhat.com Subject: [PATCH 52/52] fuse: fix fuse_permission() for the default_permissions case Date: Mon, 10 Dec 2018 12:13:18 -0500 Message-Id: <20181210171318.16998-53-vgoyal@redhat.com> In-Reply-To: <20181210171318.16998-1-vgoyal@redhat.com> References: <20181210171318.16998-1-vgoyal@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 10 Dec 2018 17:13:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miklos Szeredi Fixes: f064cab7f6ee ("fuse: add shared version support (virtio-fs only)") Signed-off-by: Miklos Szeredi --- fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index f9a91e782cf0..f1da787796e8 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1324,7 +1324,7 @@ static int fuse_permission(struct inode *inode, int mask) if (fc->default_permissions) { err = -EACCES; - if (!refreshed && !fuse_shared_version_mismatch(inode)) + if (refreshed || !fuse_shared_version_mismatch(inode)) err = generic_permission(inode, mask); /* If permission is denied, try to refresh file -- 2.13.6