Changes by: antona
Update of /cvsroot/linux-ntfs/ntfs-driver-tng/linux/fs/ntfs
In directory usw-pr-cvs1:/tmp/cvs-serv23423/linux/fs/ntfs
Modified Files:
super.c
Log Message:
Last bug fix (well, one less bug anyway). Now modprobe followed by mount followed by umount works fine when no errors occur.
The error code path probably still has bugs in it but it is now more difficult to test that everything else works...
Index: super.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfs-driver-tng/linux/fs/ntfs/super.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -U2 -r1.17 -r1.18
--- super.c 2001/07/29 02:07:16 1.17
+++ super.c 2001/07/30 16:07:28 1.18
@@ -821,8 +821,10 @@
vol->lcnbmp_ino = NULL;
iput(vol->mftmirr_ino);
+ vol->mftmirr_ino = NULL;
iput(vol->mft_ino);
vol->mft_ino = NULL;
vol->upcase_len = 0;
vfree(vol->mftbmp_rl);
+ vol->mftbmp_rl = NULL;
vfree(vol->upcase);
vol->upcase = NULL;
@@ -1062,6 +1064,9 @@
}
- /* Setup the root directory for the mounted file system. */
- if ((sb->s_root = d_alloc_root(vol->root_ino))) {
+ /*
+ * Setup the root directory for the mounted file system, we use a second
+ * iget in order to obtain a second reference to the inode.
+ */
+ if ((sb->s_root = d_alloc_root(iget(sb, FILE_$root)))) {
ntfs_debug("Exiting, status successful.\n");
return sb;
@@ -1087,6 +1092,8 @@
//force_delete(vol->mftmirr_ino);
iput(vol->mftmirr_ino);
+ vol->mftmirr_ino = NULL;
vol->upcase_len = 0;
vfree(vol->mftbmp_rl);
+ vol->mftbmp_rl = NULL;
vfree(vol->upcase);
vol->upcase = NULL;
|