[PATCH 2/2] Fix write() return values for reiserfs.

From: Robin Holt
Date: Wed Sep 15 2004 - 14:28:15 EST



This patch fixes the direct I/O return value for reiserfs writes
to be ssize_t instead of int.

Signed-off-by: Robin Holt <holt@xxxxxxx>


Index: linux-2.6/fs/reiserfs/file.c
===================================================================
--- linux-2.6.orig/fs/reiserfs/file.c 2004-09-14 14:39:37.000000000 -0500
+++ linux-2.6/fs/reiserfs/file.c 2004-09-15 12:42:41.000000000 -0500
@@ -1099,7 +1099,7 @@
{
size_t already_written = 0; // Number of bytes already written to the file.
loff_t pos; // Current position in the file.
- size_t res; // return value of various functions that we call.
+ ssize_t res; // return value of various functions that we call.
struct inode *inode = file->f_dentry->d_inode; // Inode of the file that we are writing to.
/* To simplify coding at this time, we store
locked pages in array for now */
@@ -1108,7 +1108,7 @@
th.t_trans_id = 0;

if ( file->f_flags & O_DIRECT) { // Direct IO needs treatment
- int result, after_file_end = 0;
+ ssize_t result, after_file_end = 0;
if ( (*ppos + count >= inode->i_size) || (file->f_flags & O_APPEND) ) {
/* If we are appending a file, we need to put this savelink in here.
If we will crash while doing direct io, finish_unfinished will
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/