Commit 3d3d8747 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] unreachable code in ext3_direct_IO()

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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 91cd0c2b
...@@ -1596,9 +1596,14 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, ...@@ -1596,9 +1596,14 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
if (end > inode->i_size) { if (end > inode->i_size) {
ei->i_disksize = end; ei->i_disksize = end;
i_size_write(inode, end); i_size_write(inode, end);
err = ext3_mark_inode_dirty(handle, inode); /*
if (!ret) * We're going to return a positive `ret'
ret = err; * 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); err = ext3_journal_stop(handle);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment