diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index deb679c31f2a..c387430f06c3 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -3015,9 +3015,9 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3015 | } else { | 3015 | } else { |
3016 | /* | 3016 | /* |
3017 | * The fault handler has no page to lock, so it holds | 3017 | * The fault handler has no page to lock, so it holds |
3018 | * i_mmap_lock for write to protect against truncate. | 3018 | * i_mmap_lock for read to protect against truncate. |
3019 | */ | 3019 | */ |
3020 | i_mmap_unlock_write(vma->vm_file->f_mapping); | 3020 | i_mmap_unlock_read(vma->vm_file->f_mapping); |
3021 | } | 3021 | } |
3022 | goto uncharge_out; | 3022 | goto uncharge_out; |
3023 | } | 3023 | } |
@@ -3031,9 +3031,9 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3031 | } else { | 3031 | } else { |
3032 | /* | 3032 | /* |
3033 | * The fault handler has no page to lock, so it holds | 3033 | * The fault handler has no page to lock, so it holds |
3034 | * i_mmap_lock for write to protect against truncate. | 3034 | * i_mmap_lock for read to protect against truncate. |
3035 | */ | 3035 | */ |
3036 | i_mmap_unlock_write(vma->vm_file->f_mapping); | 3036 | i_mmap_unlock_read(vma->vm_file->f_mapping); |
3037 | } | 3037 | } |
3038 | return ret; | 3038 | return ret; |
3039 | uncharge_out: | 3039 | uncharge_out: |