[PATCH] knfsd: nfsd4: acls: avoid unnecessary denies
authorJ. Bruce Fields <bfields@snoopy.citi.umich.edu>
Fri, 16 Feb 2007 09:28:36 +0000 (01:28 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 16 Feb 2007 16:14:01 +0000 (08:14 -0800)
commitbec50c47aaf6f1f9247f1860547ab394a0802a4c
treec988f486976a75ae0694a28f127c58b738debe21
parentf43daf67871d9da5c638994416b4144eac63c992
[PATCH] knfsd: nfsd4: acls: avoid unnecessary denies

We're inserting deny's between some ACEs in order to enforce posix draft acl
semantics which prevent permissions from accumulating across entries in an
acl.

That's fine, but we're doing that by inserting a deny after *every* allow,
which is overkill.  We shouldn't be adding them in places where they actually
make no difference.

Also replaced some helper functions for creating acl entries; I prefer just
assigning directly to the struct fields--it takes a few more lines, but the
field names provide some documentation that I think makes the result easier
understand.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/nfs4acl.c