Messages in this thread | | | Date | Fri, 20 Oct 2000 01:20:35 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: 2.4.0-test10-pre3:Oops in mm/filemap.c:filemap_write_pa |
| |
On Fri, 20 Oct 2000, Roger Larsson wrote:
> Is it legal/good practice to unmap the file after closing it? Yes.
> (Since the sharing needs the fd to mmap it)
It doesn't. Mapping needs struct file * and it doesn't care about fd. mmap() takes a reference to struct file by fd you've passed and after that we can forget about descriptors - vma_struct holds a reference to file and that's it.
> Successful unlinking a file should probably free pages directly to > free list - might be worth optimizing for.
_Definitely_ no. Hell, unlink() doesn't mean that anything happens with data - unlink an opened file and if that affects the read/write/lseek you've found a bug. And mapping is equivalent to having opened descriptors in that respect.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |