* [PATCH] ext4: Remove never taken branch from ext4_ext_shift_path_extents()
@ 2014-10-22 9:15 Jan Kara
2014-11-25 21:24 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2014-10-22 9:15 UTC (permalink / raw)
To: Ted Tso; +Cc: linux-ext4, Jan Kara
path[depth].p_hdr can never be NULL for a path passed to us (and even if
it could, EXT_LAST_EXTENT() would make something != NULL from it). So
just remove the branch.
Coverity-id: 1196498
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext4/extents.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 0b16fb4c06d3..31cd9b5c6419 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5239,8 +5239,6 @@ ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift,
return -EIO;
ex_last = EXT_LAST_EXTENT(path[depth].p_hdr);
- if (!ex_last)
- return -EIO;
err = ext4_access_path(handle, inode, path + depth);
if (err)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: Remove never taken branch from ext4_ext_shift_path_extents()
2014-10-22 9:15 [PATCH] ext4: Remove never taken branch from ext4_ext_shift_path_extents() Jan Kara
@ 2014-11-25 21:24 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2014-11-25 21:24 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-ext4
On Wed, Oct 22, 2014 at 11:15:04AM +0200, Jan Kara wrote:
> path[depth].p_hdr can never be NULL for a path passed to us (and even if
> it could, EXT_LAST_EXTENT() would make something != NULL from it). So
> just remove the branch.
>
> Coverity-id: 1196498
> Signed-off-by: Jan Kara <jack@suse.cz>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-25 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22 9:15 [PATCH] ext4: Remove never taken branch from ext4_ext_shift_path_extents() Jan Kara
2014-11-25 21:24 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).