mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix 32/64-bit bug in ext3
@ 2003-08-04 19:10 Theodore Ts'o
  0 siblings, 0 replies; only message in thread
From: Theodore Ts'o @ 2003-08-04 19:10 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-kernel


The following patch fixes a 32/64-bit bug in ext3.  We assign the number
of bytes written to an int instead of a ssize_t, which causes the top
32-bits of the return value from write() to be lopped off.  Please
apply to 2.6.0-test tree.  Thanks!!

						- Ted


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1595  -> 1.1596 
#	      fs/ext3/file.c	1.13    -> 1.14   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/04	tytso@think.thunk.org	1.1596
# Fix 32/64-bit error in ext2_file_write; before, the top 32-bits of
# the return value was getting chopped off.
# --------------------------------------------
#
diff -Nru a/fs/ext3/file.c b/fs/ext3/file.c
--- a/fs/ext3/file.c	Mon Aug  4 14:46:41 2003
+++ b/fs/ext3/file.c	Mon Aug  4 14:46:41 2003
@@ -60,7 +60,8 @@
 {
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = file->f_dentry->d_inode;
-	int ret, err;
+	ssize_t ret;
+	int err;
 
 	ret = generic_file_aio_write(iocb, buf, count, pos);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-04 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 19:10 [PATCH] Fix 32/64-bit bug in ext3 Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®