fs/ntfs3: Don't clear upper bits accidentally in log_replay()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 May 2022 09:03:00 +0000 (12:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:17 +0000 (11:40 +0200)
commit8feb848579157a5ac676c9a9aa26c5e0ac41e56c
treea72916d3a2aba898db7b4956cf6297a3f7209a86
parent8e8e1a84dac7a3d2b432162a70d7fb6a75960772
fs/ntfs3: Don't clear upper bits accidentally in log_replay()

commit 926034353d3c67db1ffeab47dcb7f6bdac02a263 upstream.

The "vcn" variable is a 64 bit.  The "log->clst_per_page" variable is a
u32.  This means that the mask accidentally clears out the high 32 bits
when it was only supposed to clear some low bits.  Fix this by adding a
cast to u64.

Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ntfs3/fslog.c