patch-2.3.2 linux/fs/umsdos/inode.c
Next file: linux/fs/vfat/namei.c
Previous file: linux/fs/umsdos/dir.c
Back to the patch index
Back to the overall index
- Lines: 92
- Date:
Thu May 13 23:18:21 1999
- Orig file:
v2.3.1/linux/fs/umsdos/inode.c
- Orig date:
Fri May 14 18:55:27 1999
diff -u --recursive --new-file v2.3.1/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;
}
@@ -169,29 +169,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 ...
@@ -337,7 +314,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 */
@@ -345,7 +322,8 @@
UMSDOS_put_super, /* put_super */
NULL, /* write_super */
fat_statfs, /* statfs */
- NULL /* remount_fs */
+ NULL, /* remount_fs */
+ fat_clear_inode, /* clear_inode */
};
/*
@@ -367,7 +345,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);
@@ -412,16 +390,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)