Add global config param for delegations.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
cut-paste errors and dead code removal

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Use OPEN4_SHARE_ACCESS_BOTH instead of ~OPEN4_SHARE_ACCESS_WANT_DELEG_MASK

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Minor code re-arrangement, no functional change.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Set openflags based on share access bits

openflags should not be influenced by deny bits. Rearranged the code a
bit as well.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Add EXPORT_OPTION_RPCSEC_GSS_ to pseudo filesystem.

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Fixed typos.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Get object attributes in GPFSFSAL_mknode()

A bunch of pynfs tests fail as it currently gives out parent directory
attributes rather than the actual object attributes!

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Correct is_open_for_read and is_open_for_write

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
nfs4_do_open_downgrade() doesn't modify state param

Modified it to take "state_t *" rather than "state_t **"

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Downgrade open flags when a state is removed or downgraded

Currently if two processes open the file, one in read-only mode and the
other in read-write/write mode, the file is kept open in read-write mode
as long as either of them keep the file open. With this patch, the file
is downgraded to read-only mode when the second process closes the file.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Reviewed-by: Frank S. Filz <ffilzlnx@mindspring.com>
Reviewed-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Delegation: Do not return before actually unlocking the file.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>