X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_object.c;h=b6f4d4b9e701e0c02f92a36aeb8df40b57fb4200;hp=03e8e5a03fa20bace3013dd54493070c4b77847f;hb=8e2cd001a9640c5e9959341c5af6da680c609eee;hpb=f64a4508cdbf5af6c90977b7ab3bf9f103489236 diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 03e8e5a..b6f4d4b 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -302,7 +302,9 @@ static int mdd_xattr_list(const struct lu_env *env, struct md_object *obj, rc = mdo_xattr_list(env, mdd_obj, buf); mdd_read_unlock(env, mdd_obj); - if (rc < 0) + /* If the buffer is NULL then we are only here to get the + * length of the xattr name list. */ + if (rc < 0 || buf->lb_buf == NULL) RETURN(rc); /*