Whamcloud - gitweb
liblustre:
authorericm <ericm>
Mon, 22 Dec 2003 13:21:30 +0000 (13:21 +0000)
committerericm <ericm>
Mon, 22 Dec 2003 13:21:30 +0000 (13:21 +0000)
  - inode reference leak
  - more test in sanity
  - minor message text change

lustre/liblustre/namei.c
lustre/liblustre/tests/sanity.c

index f56842e..f19a342 100644 (file)
@@ -76,11 +76,11 @@ void unhook_stale_inode(struct pnode *pno)
         LASSERT(llu_i2info(inode)->lli_stale_flag);
 
         pno->p_base->pb_ino = NULL;
+        I_RELE(inode);
 
         if (!llu_i2info(inode)->lli_open_count) {
                 CDEBUG(D_INODE, "unhook inode %p (ino %lu) from pno %p\n",
                                 inode, llu_i2info(inode)->lli_st_ino, pno);
-                I_RELE(inode);
                 if (!inode->i_ref)
                         _sysio_i_gone(inode);
         }
index 4523594..5713e4b 100644 (file)
@@ -386,6 +386,21 @@ void t14()
         t_rmdir(dir);
         LEAVE();
 }
+
+void t15()
+{
+        char *file = "/mnt/lustre/test_t15_file";
+        int fd;
+        ENTRY("open-stat-close");
+
+        t_touch(file);
+        fd = t_open(file);
+        t_check_stat(file, NULL);
+        t_close(fd);
+        t_unlink(file);
+        LEAVE();
+}
+
 extern void __liblustre_setup_(void);
 extern void __liblustre_cleanup_(void);
 
@@ -445,11 +460,10 @@ int main(int argc, char * const argv[])
         t9();
         t10();
         t11();
-/*
         t12();
         t13();
         t14();
-*/
+        t15();
 #endif
 
        printf("liblustre is about shutdown\n");