| Subject | Re: [PATCH v7 3.2-rc2 4/30] uprobes: Define hooks for mmap/munmap. | From | Peter Zijlstra <> | Date | Wed, 23 Nov 2011 18:13:50 +0100 |
| |
On Fri, 2011-11-18 at 16:37 +0530, Srikar Dronamraju wrote: > +int mmap_uprobe(struct vm_area_struct *vma) > +{ > + struct list_head tmp_list; > + struct uprobe *uprobe, *u; > + struct inode *inode; > + int ret = 0, count = 0; > + > + if (!atomic_read(&uprobe_events) || !valid_vma(vma, true)) > + return ret; /* Bail-out */ > + > + inode = igrab(vma->vm_file->f_mapping->host); > + if (!inode) > + return ret;
Since we hold mmap_sem, vma is pinned, which should pin the inode, why take out another ref?
|