For mdt_obd_connect() case, the parameter @data should never be
NULL, so drop the redundant check of "data != NULL", replace it
with "LASSERT(data != NULL);"
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia6754752527e69c89e7a40d3d012232eaba94d3e
Reviewed-on: http://review.whamcloud.com/20391
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
ENTRY;
LASSERT(env != NULL);
ENTRY;
LASSERT(env != NULL);
+ LASSERT(data != NULL);
+
if (!exp || !obd || !cluuid)
RETURN(-EINVAL);
if (!exp || !obd || !cluuid)
RETURN(-EINVAL);
* XXX: probably not very appropriate method is used now
* at some point we should find a better one
*/
* XXX: probably not very appropriate method is used now
* at some point we should find a better one
*/
- if (!test_bit(MDT_FL_SYNCED, &mdt->mdt_state) && data != NULL &&
+ if (!test_bit(MDT_FL_SYNCED, &mdt->mdt_state) &&
!(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT) &&
!(data->ocd_connect_flags & OBD_CONNECT_MDS_MDS)) {
rc = obd_get_info(env, mdt->mdt_child_exp,
!(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT) &&
!(data->ocd_connect_flags & OBD_CONNECT_MDS_MDS)) {
rc = obd_get_info(env, mdt->mdt_child_exp,