LU-10806 target: skip discard for a missing obt_lut
If error happens at tgt_init, obt_lut is zeroed. The error handle
path destroys export and calls tgt_grant_discard which access to
non allocated memory.
The patch skips release grant for zero obt_lut.
BUG: unable to handle kernel NULL pointer dereference at
0000000000000378
IP: [<
ffffffff816b6b5c>] _raw_spin_lock+0xc/0x30
[<
ffffffffc0ff7c15>] ? tgt_grant_discard+0x35/0x190 [ptlrpc]
[<
ffffffffc0fcbe2e>] ? tgt_client_free+0x17e/0x3b0 [ptlrpc]
[<
ffffffffc1414097>] mdt_destroy_export+0x87/0x200 [mdt]
Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-6260
Change-Id: Iccd80cb753122727156430e2593340c32841451c
Reviewed-on: https://review.whamcloud.com/33240
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>