GPFS: Try to open with client credentials first.

Change-Id: I4424a068a8857c7868595c66217e3feffe6e9d2a
Signed-off-by: Marc Eshel <eshel@us.ibm.com>
diff --git a/src/FSAL/FSAL_GPFS/fsal_fileop.c b/src/FSAL/FSAL_GPFS/fsal_fileop.c
index bf752dd..84582fd 100644
--- a/src/FSAL/FSAL_GPFS/fsal_fileop.c
+++ b/src/FSAL/FSAL_GPFS/fsal_fileop.c
@@ -73,20 +73,19 @@
 
 	LogFullDebug(COMPONENT_FSAL, "posix_flags 0x%X", posix_flags);
 
+	fsal_set_credentials(op_ctx->creds);
 	status = fsal_internal_handle2fd(gpfs_fs->root_fd, myself->handle,
 					 file_desc, posix_flags, reopen);
+	fsal_restore_ganesha_credentials();
 
 	if (FSAL_IS_ERROR(status)) {
-		/** In some environments, "root" is denied write access,
-		 * so try with the request credentials if the above call
-		 * fails.
+		/** Try open as root access if the above call fails,
+		 * permission will be checked somewhere else in the code.
 		 */
-		fsal_set_credentials(op_ctx->creds);
 		status = fsal_internal_handle2fd(gpfs_fs->root_fd,
 						 myself->handle,
 						 file_desc, posix_flags,
 						 reopen);
-		fsal_restore_ganesha_credentials();
 	}
 
 	return status;