ll_get_mdt_idx() calls md_getattr() with a NULL 3rd
parameter as a (struct ptlrpc_request **), this can
lead to a SEGV if lmv is skipped, like for a
single-MDS system without an LMV, and mdc_gettatr()
is called straight.
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I0f9e5f6a4ae09c9e9a26b231d26b803418827c23
Reviewed-on: http://review.whamcloud.com/5769
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
int rc;
ENTRY;
+ /* Single MDS without an LMV case */
+ if (op_data->op_flags & MF_GET_MDT_IDX) {
+ op_data->op_mds = 0;
+ RETURN(0);
+ }
*request = NULL;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_GETATTR);
if (req == NULL)