OSDN Git Service

ext4: remove unused assignments
authorluo penghao <luo.penghao@zte.com.cn>
Thu, 4 Nov 2021 06:40:07 +0000 (06:40 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Jan 2022 18:25:56 +0000 (13:25 -0500)
The eh assignment in these two places is meaningless, because the
function will goto to merge, which will not use eh.

The clang_analyzer complains as follows:

fs/ext4/extents.c:1988:4 warning:
fs/ext4/extents.c:2016:4 warning:

Value stored to 'eh' is never read

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
Link: https://lore.kernel.org/r/20211104064007.2919-1-luo.penghao@zte.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c

index c3e76a5..299d27d 100644 (file)
@@ -2025,7 +2025,6 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
                                        + ext4_ext_get_actual_len(newext));
                        if (unwritten)
                                ext4_ext_mark_unwritten(ex);
-                       eh = path[depth].p_hdr;
                        nearex = ex;
                        goto merge;
                }
@@ -2054,7 +2053,6 @@ prepend:
                                        + ext4_ext_get_actual_len(newext));
                        if (unwritten)
                                ext4_ext_mark_unwritten(ex);
-                       eh = path[depth].p_hdr;
                        nearex = ex;
                        goto merge;
                }