freebsd-nq/sys/fs/msdosfs
Craig Rodrigues 82c59ec651 When performing a mount update to change a mount from read-only to read-write,
do not call markvoldirty() until the mount has been flagged as read-write.
Due to the nature of the msdosfs code, this bug only seemed to appear for
FAT-16 and FAT-32.

This fixes the testcase:
#!/bin/sh
dd if=/dev/zero bs=1m count=1 oseek=119 of=image.msdos
mdconfig -a -t vnode -f image.msdos
newfs_msdos -F 16 /dev/md0 fd120m
mount_msdosfs -o ro /dev/md0 /mnt
mount | grep md0
mount -u -o rw /dev/md0; echo $?
mount | grep md0
umount /mnt
mdconfig -d -u 0

PR:		105412
Tested by:	Eugene Grosbein <eugen grosbein pp ru>
2007-01-06 20:46:02 +00:00
..
bootsect.h Remove checks for BOOTSIG[23] from FAT32 bootblocks. 2005-09-29 14:09:46 +00:00
bpb.h Eliminate obsolete comment, now that getushort() is implemented in 2007-01-05 05:28:57 +00:00
denode.h Replace slightly crummy fattime<->timespec conversion functions. 2006-10-24 11:14:05 +00:00
direntry.h Replace slightly crummy fattime<->timespec conversion functions. 2006-10-24 11:14:05 +00:00
fat.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:10:42 +00:00
msdosfs_conv.c o From the submitter: dos2unixchr will convert to lower case if 2006-11-26 18:49:44 +00:00
msdosfs_denode.c Replace slightly crummy fattime<->timespec conversion functions. 2006-10-24 11:14:05 +00:00
msdosfs_fat.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:10:42 +00:00
msdosfs_fileno.c Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
msdosfs_iconv.c
msdosfs_lookup.c Do not assume that `char direntry::deExtension[3]' starts right after 2006-01-22 21:09:38 +00:00
msdosfs_vfsops.c When performing a mount update to change a mount from read-only to read-write, 2007-01-06 20:46:02 +00:00
msdosfs_vnops.c o Do not leave uninitialized birthtime: in MSDOSFSMNT_LONGNAME 2006-12-03 19:04:26 +00:00
msdosfsmount.h Eliminate cdev pointer in inodes, they're not used or needed. 2005-03-15 20:57:25 +00:00