From 59223edaa18759982db0a8aced0e77457d10c68e Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 17 Jun 1999 13:25:08 +0000 Subject: Merge with Linux 2.3.6. Sorry, this isn't tested on silicon, I don't have a MIPS box at hand. --- fs/ext2/inode.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'fs/ext2/inode.c') diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 8bd5c9684..693964a80 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -562,22 +562,18 @@ void ext2_read_inode (struct inode * inode) << 32; #endif } - inode->u.ext2_i.i_version = le32_to_cpu(raw_inode->i_version); + inode->i_generation = le32_to_cpu(raw_inode->i_generation); inode->u.ext2_i.i_block_group = block_group; inode->u.ext2_i.i_next_alloc_block = 0; inode->u.ext2_i.i_next_alloc_goal = 0; if (inode->u.ext2_i.i_prealloc_count) ext2_error (inode->i_sb, "ext2_read_inode", "New inode has non-zero prealloc count!"); - if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) - inode->i_rdev = to_kdev_t(le32_to_cpu(raw_inode->i_block[0])); - else if (S_ISLNK(inode->i_mode) && !inode->i_blocks) + if (S_ISLNK(inode->i_mode) && !inode->i_blocks) for (block = 0; block < EXT2_N_BLOCKS; block++) inode->u.ext2_i.i_data[block] = raw_inode->i_block[block]; else for (block = 0; block < EXT2_N_BLOCKS; block++) inode->u.ext2_i.i_data[block] = le32_to_cpu(raw_inode->i_block[block]); - brelse (bh); - inode->i_op = NULL; if (inode->i_ino == EXT2_ACL_IDX_INO || inode->i_ino == EXT2_ACL_DATA_INO) /* Nothing to do */ ; @@ -587,12 +583,10 @@ void ext2_read_inode (struct inode * inode) inode->i_op = &ext2_dir_inode_operations; else if (S_ISLNK(inode->i_mode)) inode->i_op = &ext2_symlink_inode_operations; - else if (S_ISCHR(inode->i_mode)) - inode->i_op = &chrdev_inode_operations; - else if (S_ISBLK(inode->i_mode)) - inode->i_op = &blkdev_inode_operations; - else if (S_ISFIFO(inode->i_mode)) - init_fifo(inode); + else + init_special_inode(inode, inode->i_mode, + le32_to_cpu(raw_inode->i_block[0])); + brelse (bh); inode->i_attr_flags = 0; if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL) { inode->i_attr_flags |= ATTR_FLAG_SYNCRONOUS; @@ -692,7 +686,7 @@ static int ext2_update_inode(struct inode * inode, int do_sync) raw_inode->i_size_high = cpu_to_le32(inode->i_size >> 32); #endif } - raw_inode->i_version = cpu_to_le32(inode->u.ext2_i.i_version); + raw_inode->i_generation = cpu_to_le32(inode->i_generation); if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) raw_inode->i_block[0] = cpu_to_le32(kdev_t_to_nr(inode->i_rdev)); else if (S_ISLNK(inode->i_mode) && !inode->i_blocks) -- cgit v1.2.3