patch-1.3.28 linux/fs/ext/inode.c

Next file: linux/fs/ext/namei.c
Previous file: linux/fs/ext/freelists.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.27/linux/fs/ext/inode.c linux/fs/ext/inode.c
@@ -68,13 +68,14 @@
 {
 	struct buffer_head *bh;
 	struct ext_super_block *es;
-	int dev = s->s_dev,block;
+	kdev_t dev = s->s_dev;
+	int block;
 
 	MOD_INC_USE_COUNT;
 	lock_super(s);
 	set_blocksize(dev, BLOCK_SIZE);
 	if (!(bh = bread(dev, 1, BLOCK_SIZE))) {
-		s->s_dev=0;
+		s->s_dev = 0;
 		unlock_super(s);
 		printk("EXT-fs: unable to read superblock\n");
 		MOD_DEC_USE_COUNT;
@@ -98,8 +99,8 @@
 		s->s_dev = 0;
 		unlock_super(s);
 		if (!silent)
-			printk("VFS: Can't find an extfs filesystem on dev 0x%04x.\n",
-				   dev);
+			printk("VFS: Can't find an extfs filesystem on dev "
+			       "%s.\n", kdevname(dev));
 		MOD_DEC_USE_COUNT;
 		return NULL;
 	}
@@ -132,7 +133,7 @@
 	s->s_dev = dev;
 	s->s_op = &ext_sops;
 	if (!(s->s_mounted = iget(s,EXT_ROOT_INO))) {
-		s->s_dev=0;
+		s->s_dev = 0;
 		printk("EXT-fs: get root inode failed\n");
 		MOD_DEC_USE_COUNT;
 		return NULL;
@@ -380,7 +381,7 @@
 	inode->i_mtime = inode->i_atime = inode->i_ctime = raw_inode->i_time;
 	inode->i_blocks = inode->i_blksize = 0;
 	if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
-		inode->i_rdev = raw_inode->i_zone[0];
+		inode->i_rdev = to_kdev_t(raw_inode->i_zone[0]);
 	else for (block = 0; block < 12; block++)
 		inode->u.ext_i.i_data[block] = raw_inode->i_zone[block];
 	brelse(bh);
@@ -417,7 +418,7 @@
 	raw_inode->i_size = inode->i_size;
 	raw_inode->i_time = inode->i_mtime;
 	if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
-		raw_inode->i_zone[0] = inode->i_rdev;
+		raw_inode->i_zone[0] = kdev_t_to_nr(inode->i_rdev);
 	else for (block = 0; block < 12; block++)
 		raw_inode->i_zone[block] = inode->u.ext_i.i_data[block];
 	mark_buffer_dirty(bh, 1);
@@ -444,8 +445,9 @@
 		wait_on_buffer(bh);
 		if (bh->b_req && !bh->b_uptodate)
 		{
-			printk ("IO error syncing ext inode [%04x:%08lx]\n",
-				inode->i_dev, inode->i_ino);
+			printk ("IO error syncing ext inode ["
+				"%s:%08lx]\n",
+				kdevname(inode->i_dev), inode->i_ino);
 			err = -1;
 		}
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this