~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/hugetlbfs/inode.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
332
332
{
333
333
        cancel_dirty_page(page, /* No IO accounting for huge pages? */0);
334
334
        ClearPageUptodate(page);
335
 
        remove_from_page_cache(page);
336
 
        put_page(page);
 
335
        delete_from_page_cache(page);
337
336
}
338
337
 
339
338
static void truncate_hugepages(struct inode *inode, loff_t lstart)
413
412
        pgoff = offset >> PAGE_SHIFT;
414
413
 
415
414
        i_size_write(inode, offset);
416
 
        spin_lock(&mapping->i_mmap_lock);
 
415
        mutex_lock(&mapping->i_mmap_mutex);
417
416
        if (!prio_tree_empty(&mapping->i_mmap))
418
417
                hugetlb_vmtruncate_list(&mapping->i_mmap, pgoff);
419
 
        spin_unlock(&mapping->i_mmap_lock);
 
418
        mutex_unlock(&mapping->i_mmap_mutex);
420
419
        truncate_hugepages(inode, offset);
421
420
        return 0;
422
421
}
922
921
        return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group);
923
922
}
924
923
 
925
 
struct file *hugetlb_file_setup(const char *name, size_t size, int acctflag,
 
924
struct file *hugetlb_file_setup(const char *name, size_t size,
 
925
                                vm_flags_t acctflag,
926
926
                                struct user_struct **user, int creat_flags)
927
927
{
928
928
        int error = -ENOMEM;