Whamcloud - gitweb
b=3106
authorphil <phil>
Sun, 4 Apr 2004 20:36:38 +0000 (20:36 +0000)
committerphil <phil>
Sun, 4 Apr 2004 20:36:38 +0000 (20:36 +0000)
Don't deref NULL inode if we make it into filter_lvbo_init for (in
this case) the wrong object group

lustre/obdfilter/filter_lvb.c

index 4b8413d..a282419 100644 (file)
@@ -69,6 +69,9 @@ static int filter_lvbo_init(struct ldlm_resource *res)
         if (IS_ERR(dentry))
                 GOTO(out, rc = PTR_ERR(dentry));
 
+        if (dentry->d_inode == NULL)
+                GOTO(out, rc = -ENOENT);
+
         lvb->lvb_size = dentry->d_inode->i_size;
         lvb->lvb_mtime = LTIME_S(dentry->d_inode->i_mtime);
         lvb->lvb_blocks = dentry->d_inode->i_blocks;