Re: GFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Teigland writes:

                 if (!dumping)
                        down_read(&mm->mmap_sem);
> > +
> > +             for (vma = find_vma(mm, start); vma; vma = vma->vm_next)  {
> > +                     if (end <= vma->vm_start)
> > +                             break;
> > +                     if (vma->vm_file &&
> > +                         vma->vm_file->f_dentry->d_inode->i_sb == sb)  {
> > +                             num_gh++;
> > +                     }
> > +             }
> > +
> > +             ghs = kmalloc((num_gh + 1) * sizeof(struct gfs2_holder),
> > +                           GFP_KERNEL);
> > +             if (!ghs) {
> > +                     if (!dumping)
> > +                             up_read(&mm->mmap_sem);
> > +                     return -ENOMEM;
> > +             }
> > +
> > +             for (vma = find_vma(mm, start); vma; vma = vma->vm_next) {
> > Sorry if this is an obvious question but what prevents another thread from > doing mmap() before we do the second walk and messing up num_gh?
mm->mmap_sem ?

Aah, I read that !dumping expression the other way around. Sorry and thanks. Pekka
--

Linux-cluster@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux