summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorluo penghao <luo.penghao@zte.com.cn>2021-12-08 08:53:07 +0100
committerTheodore Ts'o <tytso@mit.edu>2022-01-10 19:25:56 +0100
commitae6ec194b55273e52351ee70d694594dcabe405d (patch)
tree158ddbc5914d81fed59237aea3c50d10cd6fd360 /fs/ext4
parentext4: remove redundant o_start statement (diff)
downloadlinux-ae6ec194b55273e52351ee70d694594dcabe405d.tar.xz
linux-ae6ec194b55273e52351ee70d694594dcabe405d.zip
ext4: remove unnecessary 'offset' assignment
Although it is in the loop, offset is reassigned at the beginning of the while loop. And after the loop, the value will not be used The clang_analyzer complains as follows: fs/ext4/dir.c:306:3 warning: Value stored to 'offset' 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/20211208075307.404703-1-luo.penghao@zte.com.cn Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/dir.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 74b172a4adda..a6bb86f52b9a 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -303,7 +303,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
goto done;
brelse(bh);
bh = NULL;
- offset = 0;
}
done:
err = 0;