mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix 32/64-bit bug in ext3
Date: Mon, 04 Aug 2003 15:10:59 -0400	[thread overview]
Message-ID: <E19jkjT-0001p0-00@think.thunk.org> (raw)


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);
 

                 reply	other threads:[~2003-08-04 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E19jkjT-0001p0-00@think.thunk.org \
    --to=tytso@mit.edu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®