]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Restore a historical ufs_inactive behavior that has been changed
authorXin LI <delphij@FreeBSD.org>
Fri, 23 Sep 2005 20:49:57 +0000 (20:49 +0000)
committerXin LI <delphij@FreeBSD.org>
Fri, 23 Sep 2005 20:49:57 +0000 (20:49 +0000)
commit0e4f6eecd7c08c82790da42131a54747e0051ad5
treedb1d6d0681bcbcfb4990eb603662d240fcc8de86
parent09eec2276d0090b26f19c7ee237d0dddb5e8ab63
Restore a historical ufs_inactive behavior that has been changed
in rev. 1.40 of ufs_inode.c, which allows an inode being truncated
even when the filesystem itself is marked RDONLY.  A subsequent
call of UFS_TRUNCATE (ffs_truncate) would panic the system as it
asserts that it can only be called when the filesystem is mounted
read-write (same changeset, rev. 1.74 of sys/ufs/ffs/ffs_inode.c).

Because ffs_mount() already takes care of sync'ing the filesystem
to disk before being downgraded to readonly, it appears to be more
desirable that we should not permit this sort of writes to disk.

This change would fix a panic that occours when read-only mounted
a corrupted filesystem and doing some file operations.

MT6/5/4 candidate

Reviewed by: mckusick
sys/ufs/ufs/ufs_inode.c