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
This commit is contained in:
Ned Bass
2016-04-15 18:55:03 +00:00
committed by Brian Behlendorf
parent 4903926f89
commit 98f03691a4
4 changed files with 65 additions and 3 deletions
+1 -1
View File
@@ -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;