[PATCH] eulerfs: remove redundant calculations

26 Jan
2022
26 Jan
'22
1:55 p.m.
uniontech inclusion category: cleanup CVE: NA The 'left' always is 0. If it is not 0, it will 'goto out;' from the previous if judgment. --- Signed-off-by: Gou Hao <gouhao@uniontech.com> --- fs/eulerfs/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/eulerfs/dax.c b/fs/eulerfs/dax.c index 9ec8ad7..131d08f 100644 --- a/fs/eulerfs/dax.c +++ b/fs/eulerfs/dax.c @@ -1172,8 +1172,8 @@ static ssize_t do_mapping_read(struct address_space *mapping, goto out; } - copied += (nr - left); - offset += (nr - left); + copied += nr; + offset += nr; index += offset >> PAGE_SHIFT; offset &= ~PAGE_MASK; } while (copied < len); -- 2.20.1
1126
Age (days ago)
1126
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gou Hao