patch-2.1.60 linux/drivers/block/md.c

Next file: linux/drivers/block/rd.c
Previous file: linux/drivers/block/ide-tape.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.59/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -374,26 +374,26 @@
 }
 
 
-static long md_read (struct inode *inode, struct file *file,
-		    char *buf, unsigned long count)
+static ssize_t md_read (struct file *file, char *buf, size_t count,
+			loff_t *ppos)
 {
-  int minor=MINOR(inode->i_rdev);
+  int minor=MINOR(file->f_dentry->d_inode->i_rdev);
 
   if (!md_dev[minor].pers)	/* Check if device is being run */
     return -ENXIO;
 
-  return block_read (inode, file, buf, count);
+  return block_read(file, buf, count, ppos);
 }
 
-static long md_write (struct inode *inode, struct file *file,
-		     const char *buf, unsigned long count)
+static ssize_t md_write (struct file *file, const char *buf,
+			 size_t count, loff_t *ppos)
 {
-  int minor=MINOR(inode->i_rdev);
+  int minor=MINOR(file->f_dentry->d_inode->i_rdev);
 
   if (!md_dev[minor].pers)	/* Check if device is being run */
     return -ENXIO;
 
-  return block_write (inode, file, buf, count);
+  return block_write(file, buf, count, ppos);
 }
 
 static struct file_operations md_fops=

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov