Whamcloud - gitweb
b=17933
authornathan <nathan>
Mon, 8 Dec 2008 22:01:45 +0000 (22:01 +0000)
committernathan <nathan>
Mon, 8 Dec 2008 22:01:45 +0000 (22:01 +0000)
CMD seems to add an unnamed link

lustre/mdd/mdd_dir.c

index 309025b..9b54aba 100644 (file)
@@ -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;
 
         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);
         /* Make sure our buf is big enough for the new one */
         leh = buf->lb_buf;
         reclen = lname->ln_namelen + sizeof(struct link_ea_entry);