OSDN Git Service

fs/ntfs3: Add missing error check
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Mon, 6 Jun 2022 15:57:21 +0000 (18:57 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 17 Jun 2022 16:18:29 +0000 (19:18 +0300)
We must check return value of log_read_rst

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/fslog.c

index 6145134..e7c4940 100644 (file)
@@ -3843,6 +3843,8 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
 
        memset(&rst_info2, 0, sizeof(struct restart_info));
        err = log_read_rst(log, l_size, false, &rst_info2);
+       if (err)
+               goto out;
 
        /* Determine which restart area to use. */
        if (!rst_info2.restart || rst_info2.last_lsn <= rst_info.last_lsn)