瀏覽代碼

nfs: fix setting of ACLs on file creation.

nfs3_get_acl() tries to skip posix equivalent ACLs, but misinterprets
the return value of posix_acl_equiv_mode(). Fix it.

This is a regression introduced by
"nfs: use generic posix ACL infrastructure for v3 Posix ACLs"

CC: Christoph Hellwig <hch@infradead.org>
CC: linux-nfs@vger.kernel.org
CC: linux-fsdevel@vger.kernel.org

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Noah Massey 11 年之前
父節點
當前提交
718360c59f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/nfs/nfs3acl.c

+ 1 - 1
fs/nfs/nfs3acl.c

@@ -80,7 +80,7 @@ struct posix_acl *nfs3_get_acl(struct inode *inode, int type)
 	}
 	}
 
 
 	if (res.acl_access != NULL) {
 	if (res.acl_access != NULL) {
-		if (posix_acl_equiv_mode(res.acl_access, NULL) ||
+		if ((posix_acl_equiv_mode(res.acl_access, NULL) == 0) ||
 		    res.acl_access->a_count == 0) {
 		    res.acl_access->a_count == 0) {
 			posix_acl_release(res.acl_access);
 			posix_acl_release(res.acl_access);
 			res.acl_access = NULL;
 			res.acl_access = NULL;