fs/ntfs3: Missed le32_to_cpu conversion
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 16 Apr 2024 06:39:48 +0000 (09:39 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 23 Apr 2024 06:34:22 +0000 (09:34 +0300)
NTFS data structure fields are stored in little-endian, it is necessary
to take this into account when working on big-endian architectures.

Fixes: 1b7dd28e14c47("fs/ntfs3: Correct function is_rst_area_valid")
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/fslog.c

index 855519713bf79074ed336ca7094cca5d5cdbc009..d9d08823de6205b31f06cbc85c22c0630b0eb0bc 100644 (file)
@@ -517,7 +517,7 @@ static inline bool is_rst_area_valid(const struct RESTART_HDR *rhdr)
                seq_bits -= 1;
        }
 
-       if (seq_bits != ra->seq_num_bits)
+       if (seq_bits != le32_to_cpu(ra->seq_num_bits))
                return false;
 
        /* The log page data offset and record header length must be quad-aligned. */