Whamcloud - gitweb
Should only happen with lctl, but just to be safe...
authoradilger <adilger>
Mon, 16 Sep 2002 23:17:29 +0000 (23:17 +0000)
committeradilger <adilger>
Mon, 16 Sep 2002 23:17:29 +0000 (23:17 +0000)
lustre/obdfilter/filter.c

index b5e2c82..eab4609 100644 (file)
@@ -567,6 +567,11 @@ static int filter_open(struct lustre_handle *conn, struct obdo *oa,
         if (IS_ERR(dentry))
                 RETURN(PTR_ERR(dentry));
 
+        if (!dentry->d_inode) {
+                CERROR("opening non-existent objid "LPX64"\n", oa->o_id);
+                RETURN(-ENOENT);
+        }
+
         filter_from_inode(oa, dentry->d_inode, OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
                           OBD_MD_FLMTIME | OBD_MD_FLCTIME);