patch-2.1.122 linux/fs/hfs/file_cap.c

Next file: linux/fs/hfs/file_hdr.c
Previous file: linux/fs/hfs/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.121/linux/fs/hfs/file_cap.c linux/fs/hfs/file_cap.c
@@ -236,7 +236,7 @@
 		end = pos + mem_count;
 
 		cap_build_meta(&meta, entry);
-		copy_from_user(((char *)&meta) + pos, buf, mem_count);
+		mem_count -= copy_from_user(((char *)&meta) + pos, buf, mem_count);
 
 		/* Update finder attributes if changed */
 		if (OVERLAPS(pos, end, struct hfs_cap_info, fi_fndr)) {

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