]> git.proxmox.com Git - pve-kernel-jessie.git/commitdiff
add fix for zfs acl write bug
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 9 May 2016 08:18:08 +0000 (10:18 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 9 May 2016 08:26:23 +0000 (10:26 +0200)
Makefile
zfs-fix-default-acl.patch [new file with mode: 0644]

index e1c20c1ad1529df33517fd057440e7933e645497..89b524b93eec6a0e799e30ed9eb49549c0e285f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -315,6 +315,7 @@ ${SPL_MODULES}: .compile_mark ${SPLSRC}
 ${ZFS_MODULES}: .compile_mark ${ZFSSRC}
        rm -rf ${ZFSDIR}
        tar xf ${ZFSSRC}
+       cd ${ZFSDIR}; patch -p1 < ../zfs-fix-default-acl.patch
        cd ${ZFSDIR}; ./autogen.sh
        cd ${ZFSDIR}; ./configure --with-spl=${TOP}/${SPLDIR} --with-spl-obj=${TOP}/${SPLDIR} --with-config=kernel --with-linux=${TOP}/${KERNEL_SRC} --with-linux-obj=${TOP}/${KERNEL_SRC}
        cd ${ZFSDIR}; make
diff --git a/zfs-fix-default-acl.patch b/zfs-fix-default-acl.patch
new file mode 100644 (file)
index 0000000..5c09de2
--- /dev/null
@@ -0,0 +1,34 @@
+From 98f03691a4c08f38ca4538c468e9523f8e6b24be Mon Sep 17 00:00:00 2001
+From: Ned Bass <bass6@llnl.gov>
+Date: Fri, 15 Apr 2016 18:55:03 +0000
+Subject: [PATCH] Fix ZPL miswrite of default POSIX ACL
+
+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 <bass6@llnl.gov>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
+Closes #4520
+
+Removed test-related changes (not included in our sources).
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ module/zfs/zpl_xattr.c                             |  2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/module/zfs/zpl_xattr.c b/module/zfs/zpl_xattr.c
+index 6a1acd7..4200919 100644
+--- a/module/zfs/zpl_xattr.c
++++ b/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;