freebsd-nq/sys/fs
Alan Cox 2971897d51 Correct an error of omission in the implementation of the truncation
operation on POSIX shared memory objects and tmpfs.  Previously, neither of
these modules correctly handled the case in which the new size of the object
or file was not a multiple of the page size.  Specifically, they did not
handle partial page truncation of data stored on swap.  As a result, stale
data might later be returned to an application.

Interestingly, a data inconsistency was less likely to occur under tmpfs
than POSIX shared memory objects.  The reason being that a different mistake
by the tmpfs truncation operation helped avoid a data inconsistency.  If the
data was still resident in memory in a PG_CACHED page, then the tmpfs
truncation operation would reactivate that page, zero the truncated portion,
and leave the page pinned in memory.  More precisely, the benevolent error
was that the truncation operation didn't add the reactivated page to any of
the paging queues, effectively pinning the page.  This page would remain
pinned until the file was destroyed or the page was read or written.  With
this change, the page is now added to the inactive queue.

Discussed with:	jhb
Reviewed by:	kib (an earlier version)
MFC after:	3 weeks
2012-01-08 20:09:26 +00:00
..
cd9660
coda
deadfs
devfs Explicitly use curthread while manipulating td_fpop during last close 2011-12-09 17:49:34 +00:00
ext2fs Migrate ufs and ext2fs from skpc() to memcchr(). 2012-01-01 20:47:33 +00:00
fdescfs
fifofs Initialize fifoinfo fi_wgen field on open. The only important is the 2011-12-04 19:25:49 +00:00
hpfs
msdosfs Discarding local array based on return values 2011-12-22 06:31:29 +00:00
nfs opt_inet6.h was missing from some files in the new NFS subsystem. 2012-01-08 01:54:46 +00:00
nfsclient opt_inet6.h was missing from some files in the new NFS subsystem. 2012-01-08 01:54:46 +00:00
nfsserver Patch the new NFS server in a manner analagous to r228520 for the 2011-12-16 00:58:41 +00:00
ntfs Minor cleanups to ntfs code 2012-01-03 19:09:01 +00:00
nullfs In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode 2012-01-05 17:06:04 +00:00
nwfs Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
portalfs
procfs
pseudofs r222004 changed sbuf_finish() to not clear the buffer error status. As a 2012-01-06 10:12:59 +00:00
smbfs Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
tmpfs Correct an error of omission in the implementation of the truncation 2012-01-08 20:09:26 +00:00
udf
unionfs