From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Re: [PATCH 5/7 v2] xen-gntdev: Add reference counting to maps Date: Mon, 10 Jan 2011 17:28:11 -0500 Message-ID: <20110110222811.GG15016@dumpdata.com> References: <1292545063-32107-1-git-send-email-dgdegra@tycho.nsa.gov> <1292545063-32107-6-git-send-email-dgdegra@tycho.nsa.gov> <4D0B8050.7050800@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4D0B8050.7050800@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel De Graaf Cc: jeremy@goop.org, xen-devel@lists.xensource.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org > -static int gntdev_del_map(struct grant_map *map) > +static void gntdev_put_map(struct grant_map *map) Aha.. here it is. .. snip .. > @@ -606,6 +594,8 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) > goto unlock_out; > } > > + atomic_inc(&map->users); > + > vma->vm_ops = &gntdev_vmops; > > vma->vm_flags |= VM_RESERVED; > @@ -614,6 +604,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) > vma->vm_flags |= VM_PFNMAP; > > vma->vm_private_data = map; > + No need for that.