patch-2.4.0-test11 linux/fs/fat/inode.c
Next file: linux/fs/fcntl.c
Previous file: linux/fs/ext2/ialloc.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Fri Nov 17 11:35:27 2000
- Orig file:
v2.4.0-test10/linux/fs/fat/inode.c
- Orig date:
Tue Sep 5 14:07:29 2000
diff -u --recursive --new-file v2.4.0-test10/linux/fs/fat/inode.c linux/fs/fat/inode.c
@@ -138,13 +138,11 @@
inode = fat_iget(sb, ino);
if (inode)
goto out;
- inode = get_empty_inode();
+ inode = new_inode(sb);
*res = -ENOMEM;
if (!inode)
goto out;
*res = 0;
- inode->i_sb = sb;
- inode->i_dev = sb->s_dev;
inode->i_ino = iunique(sb, MSDOS_ROOT_INO);
fat_fill_inode(inode, de);
fat_attach(inode, ino);
@@ -658,11 +656,9 @@
if (! sbi->nls_io)
sbi->nls_io = load_nls_default();
- root_inode=get_empty_inode();
+ root_inode=new_inode(sb);
if (!root_inode)
goto out_unload_nls;
- root_inode->i_sb = sb;
- root_inode->i_dev = sb->s_dev;
root_inode->i_ino = MSDOS_ROOT_INO;
fat_read_root(root_inode);
insert_inode_hash(root_inode);
@@ -798,7 +794,6 @@
inode->i_nlink = 1;
}
#endif
- inode->i_size = 0;
if ((nr = MSDOS_I(inode)->i_start) != 0)
while (nr != -1) {
inode->i_size += SECTOR_SIZE*sbi->cluster_size;
@@ -822,7 +817,6 @@
(CF_LE_W(de->starthi) << 16);
}
MSDOS_I(inode)->i_logstart = MSDOS_I(inode)->i_start;
- inode->i_nlink = 1;
inode->i_size = CF_LE_L(de->size);
inode->i_op = &fat_file_inode_operations;
inode->i_fop = &fat_file_operations;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)