Skip to content

Commit

Permalink
[PATCH] knfsd: nfsd4: Wrong error handling in nfs4acl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Apr 11, 2006
1 parent e465a77 commit 2499205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2499205

Please sign in to comment.