Whamcloud - gitweb
mkreg stub in osd for 'open_handling' proto
authortappro <tappro>
Tue, 20 Jun 2006 09:22:55 +0000 (09:22 +0000)
committertappro <tappro>
Tue, 20 Jun 2006 09:22:55 +0000 (09:22 +0000)
lustre/osd/osd_handler.c

index b6520fd..b4af5d0 100644 (file)
@@ -511,7 +511,7 @@ static int osd_mkreg(struct osd_thread_info *info, struct osd_object *obj,
         struct dentry     *dentry;
 
         LASSERT(obj->oo_inode == NULL);
-        LASSERT(S_ISDIR(attr->la_mode));
+        LASSERT(S_ISREG(attr->la_mode));
         LASSERT(osd->od_obj_area != NULL);
 
         dir = osd->od_obj_area->d_inode;
@@ -932,7 +932,7 @@ static int osd_add_rec(struct osd_thread_info *info, struct osd_device *dev,
                 if (parent != NULL) {
                         new = d_alloc(parent, &info->oti_str);
                         if (new != NULL) {
-                                result = inode->i_op->link(old, dir, new);
+                                result = dir->i_op->link(old, dir, new);
                                 dput(new);
                         }
                         dput(parent);