From: NeilBrown We're translating v4 ACL's to POSIX ACL's and relying on the filesystem to check those, so there's no need for a NFSv4 ACL-checking algorithm. Some day we'd like to find a way to implement the full v4 ACL protocol on the server side, but for now this is dead code. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/nfsd/nfs4acl.c | 27 --------------------------- 1 files changed, 27 deletions(-) diff -puN fs/nfsd/nfs4acl.c~nfsd4_remove_unused_acl_function fs/nfsd/nfs4acl.c --- 25/fs/nfsd/nfs4acl.c~nfsd4_remove_unused_acl_function 2005-03-21 22:50:00.000000000 -0800 +++ 25-akpm/fs/nfsd/nfs4acl.c 2005-03-21 22:50:00.000000000 -0800 @@ -940,35 +940,8 @@ match_who(struct nfs4_ace *ace, uid_t ow } } -/* 0 = granted, -EACCES = denied; mask is an nfsv4 mask, not mode bits */ -int -nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, - uid_t who, u32 mask) -{ - struct nfs4_ace *ace; - u32 allowed = 0; - - list_for_each_entry(ace, &acl->ace_head, l_ace) { - if (!match_who(ace, group, owner, who)) - continue; - switch (ace->type) { - case NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE: - allowed |= ace->access_mask; - if ((allowed & mask) == mask) - return 0; - break; - case NFS4_ACE_ACCESS_DENIED_ACE_TYPE: - if (ace->access_mask & mask) - return -EACCES; - break; - } - } - return -EACCES; -} - EXPORT_SYMBOL(nfs4_acl_new); EXPORT_SYMBOL(nfs4_acl_free); EXPORT_SYMBOL(nfs4_acl_add_ace); EXPORT_SYMBOL(nfs4_acl_get_whotype); EXPORT_SYMBOL(nfs4_acl_write_who); -EXPORT_SYMBOL(nfs4_acl_permission); _