when LMV EA is requested for removal mdt_reint_setxattr() shouldn't
try to access rr_eadata as it's NULL.
Change-Id: Iae2b6a96ba72ae54a3151f86c0f53af9517e3aad
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33273
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if (strcmp(xattr_name, XATTR_NAME_LMV) == 0) {
__u32 *magic = rr->rr_eadata;
+ /* we don't let to remove LMV? */
+ if (!rr->rr_eadata)
+ GOTO(out, rc = 0);
+
if (le32_to_cpu(*magic) == LMV_USER_MAGIC ||
le32_to_cpu(*magic) == LMV_USER_MAGIC_SPECIFIC) {
rc = mdt_dir_layout_shrink(info);