lock_avail clean up

Fixed mixing enums. No functional change as CACHE_INODE_SUCCESS and
STATE_SUCCESS evaluate to zero! Coverity CID# 30326, 30327

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix queue_notify_device calling notify_device!

queue_notify_device() calls notify_device() with first argument as
dev_exportid. It shoud be notify_type! Coverity CID# 30328

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix layoutrec_completion() using freed memory.

It frees cb_data and passes it while calling nfs41_complete_single.
nfs41_complete_single() doesn't use it at all though! Covery CID# 30406.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix a spurious NULL check on entry_lookup

Also rearranged the code to make it more readable. glist_entry returned
pointer can't be null, so fixed that as well. Coverity CID# 30382

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
nfs4_utf8string2dynamic() returns nfsstat4.

nfs4_utf8string2dynamic does NOT return cache_inode_status!
Coverity CID 30329 and 30330

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Removed dead code in get_delegation()

No functional change! Coverity CID# 30237

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Check return values from pthread_rwlock_xxlock() functions

Converted pthread_rwlock_xxlock functions with PTHREAD_RWLOCK_xxlock
macros that check the return value. Covers coverity CID# 30226, 30227,
60332, 60333

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge branch 'tp/cov.op.open' into ibm_next_20_tmp
Merge branch 'tp/cov.pthread_rwlock' into ibm_next_20_tmp