]> git.hungrycats.org Git - linux/commitdiff
[PATCH] unreachable code in ext3_direct_IO()
authorAndrew Morton <akpm@osdl.org>
Tue, 19 Oct 2004 01:01:16 +0000 (18:01 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:01:16 +0000 (18:01 -0700)
davej points out that in this code local variable `ret' is already known to be
positive non-zero, so this test is meaningless.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/ext3/inode.c

index 0e48f620d9e8a352f807404c77a095624a44d409..cf7225964a336ccc38ea89a695ef54d9f5cca23a 100644 (file)
@@ -1596,9 +1596,14 @@ out_stop:
                        if (end > inode->i_size) {
                                ei->i_disksize = end;
                                i_size_write(inode, end);
-                               err = ext3_mark_inode_dirty(handle, inode);
-                               if (!ret) 
-                                       ret = err;
+                               /*
+                                * We're going to return a positive `ret'
+                                * here due to non-zero-length I/O, so there's
+                                * no way of reporting error returns from
+                                * ext3_mark_inode_dirty() to userspace.  So
+                                * ignore it.
+                                */
+                               ext3_mark_inode_dirty(handle, inode);
                        }
                }
                err = ext3_journal_stop(handle);