patch-2.2.11 linux/fs/umsdos/inode.c
Next file: linux/fs/vfat/namei.c
Previous file: linux/fs/umsdos/file.c
Back to the patch index
Back to the overall index
- Lines: 92
- Date:
Mon Aug 9 12:04:41 1999
- Orig file:
v2.2.10/linux/fs/umsdos/inode.c
- Orig date:
Mon Apr 12 10:03:45 1999
diff -u --recursive --new-file v2.2.10/linux/fs/umsdos/inode.c linux/fs/umsdos/inode.c
@@ -60,8 +60,8 @@
" Notify jacques@solucorp.qc.ca\n");
}
- inode->u.umsdos_i.i_patched = 0;
- fat_put_inode (inode);
+ if (inode->i_count == 1)
+ inode->u.umsdos_i.i_patched = 0;
}
@@ -173,29 +173,6 @@
}
-/*
- * Load an inode from disk.
- */
-/* #Specification: Inode / post initialisation
- * To completely initialise an inode, we need access to the owner
- * directory, so we can locate more info in the EMD file. This is
- * not available the first time the inode is accessed, so we use
- * a value in the inode to tell if it has been finally initialised.
- *
- * New inodes are obtained by the lookup and create routines, and
- * each of these must ensure that the inode gets patched.
- */
-void UMSDOS_read_inode (struct inode *inode)
-{
- Printk ((KERN_DEBUG "UMSDOS_read_inode %p ino = %lu ",
- inode, inode->i_ino));
- msdos_read_inode (inode);
-
- /* inode needs patching */
- inode->u.umsdos_i.i_patched = 0;
-}
-
-
int umsdos_notify_change_locked(struct dentry *, struct iattr *);
/*
* lock the parent dir before starting ...
@@ -341,7 +318,7 @@
static struct super_operations umsdos_sops =
{
- UMSDOS_read_inode, /* read_inode */
+ NULL, /* read_inode */
UMSDOS_write_inode, /* write_inode */
UMSDOS_put_inode, /* put_inode */
fat_delete_inode, /* delete_inode */
@@ -349,7 +326,8 @@
UMSDOS_put_super, /* put_super */
NULL, /* write_super */
fat_statfs, /* statfs */
- NULL /* remount_fs */
+ NULL, /* remount_fs */
+ fat_clear_inode, /* clear_inode */
};
/*
@@ -371,7 +349,7 @@
if (!res)
goto out_fail;
- printk (KERN_INFO "UMSDOS dentry-pre 0.84 "
+ printk (KERN_INFO "UMSDOS 0.85 "
"(compatibility level %d.%d, fast msdos)\n",
UMSDOS_VERSION, UMSDOS_RELEASE);
@@ -416,16 +394,20 @@
/*
* Check for an alternate root if we're the root device.
*/
+
+extern kdev_t ROOT_DEV;
static struct dentry *check_pseudo_root(struct super_block *sb)
{
struct dentry *root, *init;
/*
* Check whether we're mounted as the root device.
- * If so, this should be the only superblock.
+ * must check like this, because we can be used with initrd
*/
- if (sb->s_list.next->next != &sb->s_list)
+
+ if (sb->s_dev != ROOT_DEV)
goto out_noroot;
+
printk("check_pseudo_root: mounted as root\n");
root = lookup_dentry(UMSDOS_PSDROOT_NAME, dget(sb->s_root), 0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)