LU-18510 llite: free op_data upon error only when alloc inside
In ll_prep_md_op_data() for preparing md_op_data, it should free
@op_data upon ll_setup_filename() failure only when @op_data is
allocated inside.
Otherwise, it will double free @op_data for the pass-in case and
may cause sanity-sec/63 crash as follows:
ll_prep_md_op_data()) lustre: failed to setup filename: rc = -126
RIP: 0010:set_freepointer.part.57+0x0/0x10
kfree+0x238/0x250
ll_prep_md_op_data+0x2af/0x870 [lustre]
sa_prep_data+0xde/0x350 [lustre]
sa_statahead+0x3b9/0xd20 [lustre]
ll_statahead_thread+0x151f/0x2210 [lustre]
Fixes:
4d38566a004 (LU-13717 sec: filename encryption)
Test-Parameters: testlist=sanity-sec env=ONLY=63,ONLY_REPEAT=250
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ia46635e5bab17e21f4c411e7497e8f70711eb4e4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>