ext4: remove never taken branch from ext4_ext_shift_path_extents()
authorJan Kara <jack@suse.cz>
Tue, 25 Nov 2014 21:23:48 +0000 (16:23 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 25 Nov 2014 21:23:48 +0000 (16:23 -0500)
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c

index e2424bafd6fe5f495b64666ad8370d56918c0c9d..c3a1fa1398f515677aaae13926d92cd2f3fc4374 100644 (file)
@@ -5249,8 +5249,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)