Module Name: src Committed By: hannken Date: Thu May 13 08:57:29 UTC 2021
Modified Files: src/sys/fs/ntfs: ntfs_subr.c Log Message: 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.63 -r1.64 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.63 src/sys/fs/ntfs/ntfs_subr.c:1.64 --- src/sys/fs/ntfs/ntfs_subr.c:1.63 Fri Jan 17 20:08:08 2020 +++ src/sys/fs/ntfs/ntfs_subr.c Thu May 13 08:57:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_subr.c,v 1.63 2020/01/17 20:08:08 ad Exp $ */ +/* $NetBSD: ntfs_subr.c,v 1.64 2021/05/13 08:57:29 hannken 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.63 2020/01/17 20:08:08 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ntfs_subr.c,v 1.64 2021/05/13 08:57:29 hannken 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;