On Fri, 13 Dec 2002, Anton Altaparmakov wrote:
> This is guaranteed. But now it doesn't matter any more. You are simply not
> allowed to close extent inodes. If you do, you get what you deserve. But I
> agree with the below patch. It adds a nice safety check. I will make it
> different however so that it outputs rude error messages when that code
> gets hit so people are told not to do this again... (-;
I'm afraid libntfs has two such examples itself ;)
Szaka
--- libntfs/attrib.c 13 Dec 2002 08:24:35 -0000 1.2
+++ libntfs/attrib.c 13 Dec 2002 16:40:06 -0000
@@ -1559,9 +1559,6 @@
break;
}
} else { /* Mft references do not match. */
- /* If there is a mapped extent inode unmap it first. */
- if (ni != base_ni)
- ntfs_inode_close(ni);
/* Do we want the base record back? */
if (MREF_LE(al_entry->mft_reference) ==
base_ni->mft_no) {
@@ -1642,8 +1639,6 @@
goto do_next_attr_loop;
}
if (ni != base_ni) {
- if (ni)
- ntfs_inode_close(ni);
ctx->ntfs_ino = base_ni;
ctx->mrec = ctx->base_mrec;
ctx->attr = ctx->base_attr;
|