In "llu_file_prwv()", the calling "ccc_env_thread_io(env)" will
erases all valid values assigned before into "llu_file_prwv()",
then the "io->ci_obj" and "io->ci_lockreq" become unspecified,
and then causes subsequent "cl_object_top()" to access NULL pointer
and triggers "slp_io_rw_lock()" assertion.
Change-Id: I0e878c39d6fb21c5f4d93d037763ae68ee8f102e
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1031
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
* Use is subject to license terms.
*/
/*
+ * Copyright (c) 2011 Whamcloud, Inc.
+ */
+/*
* This file is part of Lustre, http://www.lustre.org/
* Lustre is a trademark of Sun Microsystems, Inc.
*
if (IS_ERR(env))
RETURN(PTR_ERR(env));
- io = ccc_env_thread_io(env);
+ /* Do NOT call "ccc_env_thread_io()" again to prevent reinitializing */
+ io = &ccc_env_info(env)->cti_io;
if (cl_io_rw_init(env, io, session->lis_cmd == OBD_BRW_WRITE?CIT_WRITE:
CIT_READ,
pos, len) == 0) {