diff options
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r-- | fs/hugetlbfs/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index b9eeb1cd03f..7aafeb8fa30 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -412,10 +412,10 @@ static int hugetlb_vmtruncate(struct inode *inode, loff_t offset) | |||
412 | pgoff = offset >> PAGE_SHIFT; | 412 | pgoff = offset >> PAGE_SHIFT; |
413 | 413 | ||
414 | i_size_write(inode, offset); | 414 | i_size_write(inode, offset); |
415 | spin_lock(&mapping->i_mmap_lock); | 415 | mutex_lock(&mapping->i_mmap_mutex); |
416 | if (!prio_tree_empty(&mapping->i_mmap)) | 416 | if (!prio_tree_empty(&mapping->i_mmap)) |
417 | hugetlb_vmtruncate_list(&mapping->i_mmap, pgoff); | 417 | hugetlb_vmtruncate_list(&mapping->i_mmap, pgoff); |
418 | spin_unlock(&mapping->i_mmap_lock); | 418 | mutex_unlock(&mapping->i_mmap_mutex); |
419 | truncate_hugepages(inode, offset); | 419 | truncate_hugepages(inode, offset); |
420 | return 0; | 420 | return 0; |
421 | } | 421 | } |
@@ -921,7 +921,8 @@ static int can_do_hugetlb_shm(void) | |||
921 | return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group); | 921 | return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group); |
922 | } | 922 | } |
923 | 923 | ||
924 | 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, | ||
925 | struct user_struct **user, int creat_flags) | 926 | struct user_struct **user, int creat_flags) |
926 | { | 927 | { |
927 | int error = -ENOMEM; | 928 | int error = -ENOMEM; |