diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-22 16:27:52 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-24 23:34:54 -0400 |
commit | 72c2d53192004845cbc19cd8a30b3212a9288140 (patch) | |
tree | 31fcd924438f03d5aa09d13ffd813fb153da37c3 /mm/mmap.c | |
parent | 22bd002ee76aa7d7a3393f39d977f6c106153c60 (diff) |
file->f_op is never NULL...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1299,7 +1299,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1299 | vm_flags &= ~VM_MAYEXEC; | 1299 | vm_flags &= ~VM_MAYEXEC; |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | if (!file->f_op || !file->f_op->mmap) | 1302 | if (!file->f_op->mmap) |
1303 | return -ENODEV; | 1303 | return -ENODEV; |
1304 | if (vm_flags & (VM_GROWSDOWN|VM_GROWSUP)) | 1304 | if (vm_flags & (VM_GROWSDOWN|VM_GROWSUP)) |
1305 | return -EINVAL; | 1305 | return -EINVAL; |
@@ -1951,7 +1951,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, | |||
1951 | return -ENOMEM; | 1951 | return -ENOMEM; |
1952 | 1952 | ||
1953 | get_area = current->mm->get_unmapped_area; | 1953 | get_area = current->mm->get_unmapped_area; |
1954 | if (file && file->f_op && file->f_op->get_unmapped_area) | 1954 | if (file && file->f_op->get_unmapped_area) |
1955 | get_area = file->f_op->get_unmapped_area; | 1955 | get_area = file->f_op->get_unmapped_area; |
1956 | addr = get_area(file, addr, len, pgoff, flags); | 1956 | addr = get_area(file, addr, len, pgoff, flags); |
1957 | if (IS_ERR_VALUE(addr)) | 1957 | if (IS_ERR_VALUE(addr)) |