From patchwork Wed Apr 27 14:00:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 615658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3qw1pL3Cyhz9t6m; Thu, 28 Apr 2016 00:01:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1avQ1Z-0000n8-2v; Wed, 27 Apr 2016 14:01:05 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1avQ1T-0000hL-Nc for kernel-team@lists.ubuntu.com; Wed, 27 Apr 2016 14:00:59 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1avQ1T-00075H-9A; Wed, 27 Apr 2016 14:00:59 +0000 From: Colin King To: kernel-team@lists.ubuntu.com Subject: [PATCH] Fix ZPL miswrite of default POSIX ACL Date: Wed, 27 Apr 2016 15:00:58 +0100 Message-Id: <1461765658-20493-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Ned Bass BugLink: http://bugs.launchpad.net/bugs/1574801 Commit 4967a3e introduced a typo that caused the ZPL to store the intended default ACL as an access ACL. Due to caching this problem may not become visible until the filesystem is remounted or the inode is evicted from the cache. Fix the typo and add a regression test. Signed-off-by: Ned Bass Signed-off-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #4520 (backport from 98f03691a4c08f38ca4538c468e9523f8e6b24be https://github.com/zfsonlinux/zfs.git) (dropped redundant modifications to zfs tests, we don't have these) Signed-off-by: Colin Ian King --- zfs/module/zfs/zpl_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zfs/module/zfs/zpl_xattr.c b/zfs/module/zfs/zpl_xattr.c index 6a1acd7..4200919 100644 --- a/zfs/module/zfs/zpl_xattr.c +++ b/zfs/module/zfs/zpl_xattr.c @@ -969,7 +969,7 @@ zpl_set_acl(struct inode *ip, int type, struct posix_acl *acl) break; case ACL_TYPE_DEFAULT: - name = XATTR_NAME_POSIX_ACL_ACCESS; + name = XATTR_NAME_POSIX_ACL_DEFAULT; if (!S_ISDIR(ip->i_mode)) return (acl ? -EACCES : 0); break;