From 3d3d87471e1f45e3951c4860659cc4495cdafe6d Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 18 Oct 2004 18:01:16 -0700 Subject: [PATCH] [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: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ext3/inode.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 0e48f620d9e8a..cf7225964a336 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -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); -- 2.53.0