From e1fbde130442f4b027f0a44f45993f685d17f0c9 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 8 Dec 2008 22:01:45 +0000 Subject: [PATCH] b=17933 CMD seems to add an unnamed link --- lustre/mdd/mdd_dir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 309025bb..9b54aba 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -2271,6 +2271,9 @@ static int __mdd_links_add(const struct lu_env *env, struct lu_buf *buf, struct link_ea_entry *lee; int reclen; + if (lname == NULL || pfid == NULL) + return -EINVAL; + /* Make sure our buf is big enough for the new one */ leh = buf->lb_buf; reclen = lname->ln_namelen + sizeof(struct link_ea_entry); -- 1.8.3.1