[PATCH] And another small ntfs fix

Anton Altaparmakov (aia21@cus.cam.ac.uk)
Wed, 25 Jul 2001 00:09:49 +0100 (BST)


Linus,

Please apply below patch. It is incremental to patch before previous one.

Fixes a truly silly bug reported by the Stanford Checker, where we
dereference an inode pointer and then check for it not being NULL
afterwards...

Best regards,

Anton

-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

------ cut here ------- --- linux-2.4.7-pre8-vanilla/fs/ntfs/dir.c.old Wed Jul 25 00:03:57 2001 +++ linux-2.4.7-pre8-vanilla/fs/ntfs/dir.c Wed Jul 25 00:04:40 2001 @@ -789,7 +789,7 @@ int block; int start; ntfs_attribute *attr; - ntfs_volume *vol = ino->vol; + ntfs_volume *vol; int byte, bit; int error = 0; @@ -797,6 +797,7 @@ ntfs_error("No inode passed to getdir_unsorted\n"); return -EINVAL; } + vol = ino->vol; if (!vol) { ntfs_error("Inode %d has no volume\n", ino->i_number); return -EINVAL;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/