> Things it needs:
> * Someone to verify that vmtruncate(inode, 0) works and is
> the right thing to do
> * Investigation of how to handle the CLONE_FILES case.
vmtruncate doesn't do what you need to do as it only works on files that
are in the page cache, whereas device drivers, like sound, mark their
mmap'd pages reserved so that the kernel doesn't touch them. More than
likely, you'll have to walk the inode->i_mmap ring and unmap each one.
You'll have to be careful about grabbing semaphores. Revoke probably
needs to prevent open from grabbing a new file handle before it has
finished its work -- add to that the need for the mmap semaphore and
there's plenty of ordering constraints.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/