patch-2.4.10 linux/fs/adfs/inode.c
Next file: linux/fs/affs/Changes
Previous file: linux/fs/Makefile
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Mon Sep 10 07:31:25 2001
- Orig file:
v2.4.9/linux/fs/adfs/inode.c
- Orig date:
Fri Dec 29 14:07:57 2000
diff -u --recursive --new-file v2.4.9/linux/fs/adfs/inode.c linux/fs/adfs/inode.c
@@ -220,7 +220,7 @@
if (inode->u.adfs_i.stamped) {
/* convert 32-bit seconds to 40-bit centi-seconds */
low = (secs & 255) * 100;
- high = (secs / 256) * 100 + (low << 8) + 0x336e996a;
+ high = (secs / 256) * 100 + (low >> 8) + 0x336e996a;
inode->u.adfs_i.loadaddr = (high >> 24) |
(inode->u.adfs_i.loadaddr & ~0xff);
@@ -319,7 +319,11 @@
goto out;
if (ia_valid & ATTR_SIZE)
- vmtruncate(inode, attr->ia_size);
+ error = vmtruncate(inode, attr->ia_size);
+
+ if (error)
+ goto out;
+
if (ia_valid & ATTR_MTIME) {
inode->i_mtime = attr->ia_mtime;
adfs_unix2adfs_time(inode, attr->ia_mtime);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)