Author: kib Date: Tue Apr 2 13:41:26 2019 New Revision: 345799 URL: https://svnweb.freebsd.org/changeset/base/345799
Log: Block creation of the new nodes for read-only tmpfs mounts. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D19737 Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 2 13:38:00 2019 (r345798) +++ head/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 2 13:41:26 2019 (r345799) @@ -218,6 +218,8 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount */ return (EBUSY); } + if ((mp->mnt_kern_flag & MNT_RDONLY) != 0) + return (EROFS); nnode = (struct tmpfs_node *)uma_zalloc_arg(tmp->tm_node_pool, tmp, M_WAITOK); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"