From: ericm Date: Mon, 22 Dec 2003 13:21:30 +0000 (+0000) Subject: liblustre: X-Git-Tag: v1_7_0_51~2^7~140 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e497d9120b69ce11c9287ba828f51774778c3fc2;p=fs%2Flustre-release.git liblustre: - inode reference leak - more test in sanity - minor message text change --- diff --git a/lustre/liblustre/namei.c b/lustre/liblustre/namei.c index f56842e..f19a342 100644 --- a/lustre/liblustre/namei.c +++ b/lustre/liblustre/namei.c @@ -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); } diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c index 4523594..5713e4b 100644 --- a/lustre/liblustre/tests/sanity.c +++ b/lustre/liblustre/tests/sanity.c @@ -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");