[linux-cifs-client] cifs_partialpagewrite() cleanup

Vasily Averin vvs at sw.ru
Tue Dec 18 14:00:10 GMT 2007


rc cannot be -EBADF now and condition is always true

Signed-off-by:	Vasily Averin <vvs at sw.ru>

--- a/fs/cifs/file.c	2007-12-18 16:46:53.000000000 +0300
+++ b/fs/cifs/file.c	2007-12-18 16:49:25.000000000 +0300
@@ -1181,10 +1181,8 @@ static int cifs_partialpagewrite(struct
 		inode->i_atime = inode->i_mtime = current_fs_time(inode->i_sb);
 		if ((bytes_written > 0) && (offset)) {
 			rc = 0;
-		} else if (bytes_written < 0) {
-			if (rc != -EBADF)
-				rc = bytes_written;
-		}
+		} else if (bytes_written < 0)
+			rc = bytes_written;
 	} else {
 		cFYI(1, ("No writeable filehandles for inode"));
 		rc = -EIO;


More information about the linux-cifs-client mailing list