Module Name: src Committed By: martin Date: Mon May 17 15:48:57 UTC 2021
Modified Files: src/sys/fs/ntfs [netbsd-9]: ntfs_subr.c Log Message: Pull up following revision(s) (requested by hannken in ticket #1272): sys/fs/ntfs/ntfs_subr.c: revision 1.64 ntfs_loadntnode(): Use bread() when ntm_sysvn[NTFS_MFTINO] is NULL. May happen when loading node 0 (MFT) during mount and some attributes are stored in another ntnode. PR kern/56160 (Mount ntfs usb disk) To generate a diff of this commit: cvs rdiff -u -r1.61.22.1 -r1.61.22.2 src/sys/fs/ntfs/ntfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/ntfs/ntfs_subr.c diff -u src/sys/fs/ntfs/ntfs_subr.c:1.61.22.1 src/sys/fs/ntfs/ntfs_subr.c:1.61.22.2 --- src/sys/fs/ntfs/ntfs_subr.c:1.61.22.1 Mon Oct 21 20:15:02 2019 +++ src/sys/fs/ntfs/ntfs_subr.c Mon May 17 15:48:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_subr.c,v 1.61.22.1 2019/10/21 20:15:02 martin Exp $ */ +/* $NetBSD: ntfs_subr.c,v 1.61.22.2 2021/05/17 15:48:57 martin Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko (sem...@freebsd.org) @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ntfs_subr.c,v 1.61.22.1 2019/10/21 20:15:02 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ntfs_subr.c,v 1.61.22.2 2021/05/17 15:48:57 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -267,7 +267,8 @@ ntfs_loadntnode(struct ntfsmount *ntmp, mfrp = malloc(ntfs_bntob(ntmp->ntm_bpmftrec), M_TEMP, M_WAITOK); - if (ip->i_number < NTFS_SYSNODESNUM) { + if (ip->i_number < NTFS_SYSNODESNUM || + ntmp->ntm_sysvn[NTFS_MFTINO] == NULL) { struct buf *bp; daddr_t bn; off_t boff;