[PATCH] Buglet in ntfs_create(), ntfs_mkdir()

Alexander Viro (viro@math.psu.edu)
Fri, 19 Mar 1999 04:32:41 -0500 (EST)


Both ntfs_create() and ntfs_mkdir() use get_empty_inode() to
allocate a new in-core inode and never hash it. They do d_instantiate() on
unhashed inode. Bad, since those inodes never make their way to
per-superblock dirty list. Moreover, ntfs_lookup() uses iget().

Trivial patch follows:
--- fs/ntfs/fs.c Sun Jan 3 22:40:07 1999
+++ fs/ntfs/fs.c.new Fri Mar 19 04:29:58 1999
@@ -505,6 +505,7 @@
#endif
r->i_mode &= ~vol->umask;

+ insert_inode_hash(r);
d_instantiate(d,r);
return 0;
fail:
@@ -567,6 +568,7 @@
#endif
r->i_mode &= ~vol->umask;

+ insert_inode_hash(r);
d_instantiate(d, r);
error = 0;
out:

Linus, apply it to the tree, please. It's against 2.2.3.
Cheers,
Al

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