patch-2.1.4 linux/fs/open.c

Next file: linux/fs/pipe.c
Previous file: linux/fs/nfs/symlink.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/fs/open.c linux/fs/open.c
@@ -181,8 +181,8 @@
 			iput(inode);
 			return error;
 		}
-		newattrs.ia_atime = get_user(&times->actime);
-		newattrs.ia_mtime = get_user(&times->modtime);
+		get_user(newattrs.ia_atime, &times->actime);
+		get_user(newattrs.ia_mtime, &times->modtime);
 		newattrs.ia_valid |= ATTR_ATIME_SET | ATTR_MTIME_SET;
 	} else {
 		if (current->fsuid != inode->i_uid &&
@@ -224,7 +224,7 @@
 			iput(inode);
 			return error;
 		}
-		memcpy_fromfs(&times, utimes, sizeof(times));
+		copy_from_user(&times, utimes, sizeof(times));
 		newattrs.ia_atime = times[0].tv_sec;
 		newattrs.ia_mtime = times[1].tv_sec;
 		newattrs.ia_valid |= ATTR_ATIME_SET | ATTR_MTIME_SET;

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