From: wang di Date: Mon, 3 Jun 2013 13:40:39 +0000 (+0800) Subject: staging/lustre/ofd: refill env in ofd_get_info X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ee688d0d0a2600fda39b128c3a9fa081612bfa6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/ofd: refill env in ofd_get_info Because ofd_get_info(KEY_FIEMAP) might be called from ptlrpc_server_handle_req_in(see the stack below), where env might not be initialized correctly(see LBUG below), so it refill refill in ofd_get_info. LutreError: 19182:0:(ofd_internal.h:518:ofd_info_init()) LBUG Pid: 19182, comm: ll_ost_io00_001 Call Trace: [] libcfs_debug_dumpstack+0x55/0x80 [libcfs] [] lbug_with_loc+0x47/0xb0 [libcfs] [] ofd_info_init+0x92/0x130 [ofd] [] ofd_get_info+0x2e5/0xa90 [ofd] [] ? pointer+0x8d/0x830 [] ? lprocfs_counter_add+0x125/0x182 [lvfs] [] nrs_orr_range_fill_physical+0x18a/0x540 [ptlrpc] [] ? __req_capsule_get+0x166/0x700 [ptlrpc] [] ? lustre_swab_ost_body+0x0/0x10 [ptlrpc] [] nrs_orr_res_get+0x817/0xb80 [ptlrpc] [] nrs_resource_get+0x56/0x110 [ptlrpc] [] nrs_resource_get_safe+0x8b/0x100 [ptlrpc] [] ptlrpc_nrs_req_initialize+0x38/0x90 [ptlrpc] [] ptlrpc_main+0x1170/0x16f0 [ptlrpc] [] ? ptlrpc_main+0x0/0x16f0 [ptlrpc] [] child_rip+0xa/0x20 [] ? ptlrpc_main+0x0/0x16f0 [ptlrpc] [] ? ptlrpc_main+0x0/0x16f0 [ptlrpc] [] ? child_rip+0x0/0x20 [picked ptlrpc part for upstream kernel submission] Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3239 Lustre-change: http://review.whamcloud.com/6204 Signed-off-by: wang di Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: Nikitas Angelinas Reviewed-by: Oleg Drokin Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 80111273b2dc..1667b8e86012 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -2396,6 +2396,7 @@ static int ptlrpc_main(void *arg) /* Process all incoming reqs before handling any */ if (ptlrpc_server_request_incoming(svcpt)) { lu_context_enter(&env->le_ctx); + env->le_ses = NULL; ptlrpc_server_handle_req_in(svcpt, thread); lu_context_exit(&env->le_ctx);