patch-2.1.5 linux/drivers/block/loop.c
Next file: linux/drivers/cdrom/cdu31a.c
Previous file: linux/drivers/block/floppy.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Wed Oct 16 10:10:39 1996
- Orig file:
v2.1.4/linux/drivers/block/loop.c
- Orig date:
Wed Oct 16 10:48:08 1996
diff -u --recursive --new-file v2.1.4/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -455,14 +455,11 @@
case BLKGETSIZE: /* Return device size */
if (!lo->lo_inode)
return -ENXIO;
- if (!arg) return -EINVAL;
- err = verify_area(VERIFY_WRITE, (long *) arg, sizeof(long));
- if (err)
- return err;
- put_fs_long(loop_sizes[lo->lo_number] << 1, (long *) arg);
- return 0;
- default:
+ if (!arg)
return -EINVAL;
+ return put_user(loop_sizes[lo->lo_number] << 1, (int *) arg);
+ default:
+ return -EINVAL;
}
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov