]> git.sur5r.net Git - u-boot/blobdiff - fs/ext4/ext4_journal.c
cgtqmx6eval: Add a maintainer entry
[u-boot] / fs / ext4 / ext4_journal.c
index a540367a70af35a494b018cb3df8944d371bd31c..3f613351a4328b7a76ed87838dbd965c50038037 100644 (file)
  * Written by Stephen C. Tweedie <sct@redhat.com>
  *
  * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved
- * This file is part of the Linux kernel and is made available under
- * the terms of the GNU General Public License, version 2, or at your
- * option, any later version, incorporated herein by reference.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -387,7 +371,7 @@ void recover_transaction(int prev_desc_logical_no)
                blknr = read_allocated_block(&inode_journal, i);
                ext4fs_devread((lbaint_t)blknr * fs->sect_perblk, 0,
                               fs->blksz, metadata_buff);
-               put_ext4((uint64_t)(be32_to_cpu(tag->block) * fs->blksz),
+               put_ext4((uint64_t)((uint64_t)be32_to_cpu(tag->block) * (uint64_t)fs->blksz),
                         metadata_buff, (uint32_t) fs->blksz);
        } while (!(flags & EXT3_JOURNAL_FLAG_LAST_TAG));
 fail:
@@ -547,7 +531,7 @@ end:
 
                blknr = read_allocated_block(&inode_journal,
                                         EXT2_JOURNAL_SUPERBLOCK);
-               put_ext4((uint64_t) (blknr * fs->blksz),
+               put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz),
                         (struct journal_superblock_t *)temp_buff,
                         (uint32_t) fs->blksz);
                ext4fs_free_revoke_blks();
@@ -606,7 +590,7 @@ static void update_descriptor_block(long int blknr)
        tag.flags = cpu_to_be32(EXT3_JOURNAL_FLAG_LAST_TAG);
        memcpy(temp - sizeof(struct ext3_journal_block_tag), &tag,
               sizeof(struct ext3_journal_block_tag));
-       put_ext4((uint64_t) (blknr * fs->blksz), buf, (uint32_t) fs->blksz);
+       put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz), buf, (uint32_t) fs->blksz);
 
        free(temp_buff);
        free(buf);
@@ -641,7 +625,7 @@ static void update_commit_block(long int blknr)
                return;
        }
        memcpy(buf, &jdb, sizeof(struct journal_header_t));
-       put_ext4((uint64_t) (blknr * fs->blksz), buf, (uint32_t) fs->blksz);
+       put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz), buf, (uint32_t) fs->blksz);
 
        free(temp_buff);
        free(buf);