]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/zfs/zfs.c
Merge branch 'u-boot/master' into u-boot-arm/master
[karo-tx-uboot.git] / fs / zfs / zfs.c
index 2db45b19286a081c030b3f43cad85920b38b81d7..099d51718b987039f5e1c93cfae5686b5e2f28e6 100644 (file)
@@ -8,19 +8,7 @@
  *     Free Software Foundation, Inc.
  *     Copyright 2004  Sun Microsystems, Inc.
  *
- *     GRUB 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.
- *
- *     GRUB 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 GRUB.  If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -30,6 +18,7 @@
 #include <linux/ctype.h>
 #include <asm/byteorder.h>
 #include "zfs_common.h"
+#include "div64.h"
 
 block_dev_desc_t *zfs_dev_desc;
 
@@ -2115,7 +2104,8 @@ zfs_read(zfs_file_t file, char *buf, uint64_t len)
                /*
                 * Find requested blkid and the offset within that block.
                 */
-               uint64_t blkid = (file->offset + red) /  blksz;
+               uint64_t blkid = file->offset + red;
+               blkid = do_div(blkid, blksz);
                free(data->file_buf);
                data->file_buf = 0;