lkml.org 
[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: remap_page_range / zeromap_page_range
Richard Dynes wrote:
> These functions seem to be symmetric, and so I would assume that if
> remap_page_range is called to create the mapping, that when the file
> is closed zeromap_page_range should also be called.

It should call zap_page_range not zeromap_page_range.
zap_page_range removes mappings; zeromap_page_range creates COW zero
maps (cf. MAP_ANONYMOUS, /dev/zero).

However, this is handled for you in munmap(). As long as you have any
mapping of the device, there will be a reference to its inode. The
final call to the inode's release() will happen after the last reference
is removed, at which point all the mappings have been removed anyway.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.018 / U:1.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site