Revert "Fix directory fd leak."

This reverts commit d1867d489cc81992f1c0ced00fdb7f9fea89bf1b.
Fix HOSTNAME option
Don't fail remove if cache_inode_refresh_attrs_locked(to_remove_entry) fails

We update the attr of to_remove_entry just in case it had a link count > 1
and thus doesn't actually get removed, but this will commonly fail since
most files have link count == 1.

This was fixed in 1.5 but somehow not ported.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix DESCID5 and DESCID6

We should return NFS4ERR_CLIENTID_BUSY instead of NFS4ERR_CLID_INUSE
if there are still active sessions for a clientid being destroyed

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix EID4

We need to check the flags bits in EXCHANGE_ID

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix EID5e

CREATE_SESSION expects NFS4ERR_STALE_CLIENTID instead of NFS4ERR_EXPIRED
if the clientid4 value is unknown.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23359 fix negative_return_fn in fsal_save_ganesha_credentials

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23538 fix NULL pointer reference in nfs4_op_lookupp_pseudo_by_exp

This is a degenerate case, but make Coverity happy.

We will do all of this cleaner when we create FSAL_PSEUDO.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23541 Fix possible NULL referent in unregister_log_facility

Should use passed in facility name, not existing facility name.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix GPFS file handle size to be variable.
CID23542 fix fd leak in log_to_file

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23543 fix resource leak in reread_log_config

Need to free the config tree.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23544 fix resource leak in nfs4_op_open

Must free filename after use.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23545 fix resource leak in nfs4_Compound

Must free tagname after verification.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID23548 Fix unitialized reference to sattr in nfs4_op_create

Only set mode from sattr if attributes are present.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID#18493 Resource leak in nfs4_op_layoutget

If the return value of one_segment is different
than NFS4_OK, then we jump to the out label.
layouts was freed only if res_LAYOUTGET4->logr_status
is different than NFS4_OK which leads to a memory
leak if the value of nfs_status isn't checked as well.
Fix setting of EOF for GPFS file read.
Fix hash locking problem in nfs41_Session_Set fixes CSESS17

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
9P/RDMA: reflect latest mooshika API changes and check mooshika version with pkgconfig
CID#18258 Structurally dead code in str_lockt

This instruction could never be reached under any circumstances.
As suggested by Frank Filz, let's keep the ending
return statement and remove the default case.
This is to avoid missing case detection with
strict compile can keep the code honest. We have
had number of bugs happen because someone added
to an enum and didn't add cases to every switch on
that enum.