]> err.no Git - linux-2.6/commitdiff
[PATCH] knfsd: nfsd4: Wrong error handling in nfs4acl
authorNeilBrown <neilb@suse.de>
Tue, 11 Apr 2006 05:55:24 +0000 (22:55 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:51 +0000 (06:18 -0700)
this fixes coverity id #3.  Coverity detected dead code, since the == -1
comparison only returns 0 or 1 to error.  Therefore the if ( error < 0 )
statement was always false.  Seems that this was an if( error = nfs4...  )
statement some time ago, which got broken during cleanup.

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

index 7391f4aabedb0bd07e78ef26e64689ef2503f97f..63818a51c05c16a75c1e960b49d2d6ea1ca2918d 100644 (file)
@@ -790,7 +790,7 @@ nfs4_acl_split(struct nfs4_acl *acl, struct nfs4_acl *dacl)
                        continue;
 
                error = nfs4_acl_add_ace(dacl, ace->type, ace->flag,
-                               ace->access_mask, ace->whotype, ace->who) == -1;
+                               ace->access_mask, ace->whotype, ace->who);
                if (error < 0)
                        goto out;