Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-9856 mdd: handle NULL buffer in mdd_xattr_list()
[fs/lustre-release.git]
/
lustre
/
mdd
/
mdd_object.c
diff --git
a/lustre/mdd/mdd_object.c
b/lustre/mdd/mdd_object.c
index
03e8e5a
..
b6f4d4b
100644
(file)
--- 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);
/*