Re: mmap(), close(), and dget()

Bill Hawes (whawes@star.net)
Tue, 03 Feb 1998 14:13:43 -0500


Jason McMullan wrote:

> Shouldn't the proper semantics be that unmapping the vma does
> a dput(), sysctl_close() does a dput(), and that dput() itself
> calls inode->op.close() when the use count is zero???

Hi Jason,

The inode i_op functions operate at a higher level, when there's still a file
pointer around. Unmapping a vma does indeed do a dput() but the file pointer
used for mapping the vma is long gone.

Regards,
Bill