projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch simple cases of fget_light to fdget
[deliverable/linux.git]
/
arch
/
ia64
/
kernel
/
perfmon.c
diff --git
a/arch/ia64/kernel/perfmon.c
b/arch/ia64/kernel/perfmon.c
index 3fa4bc536953c9494eabc776b1c77a980cb2e148..e3bd7b8aceabb3696fa5deb88521c4e48512f8cc 100644
(file)
--- a/
arch/ia64/kernel/perfmon.c
+++ b/
arch/ia64/kernel/perfmon.c
@@
-2306,7
+2306,7
@@
pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
* partially initialize the vma for the sampling buffer
*/
vma->vm_mm = mm;
* partially initialize the vma for the sampling buffer
*/
vma->vm_mm = mm;
- vma->vm_file =
filp
;
+ vma->vm_file =
get_file(filp)
;
vma->vm_flags = VM_READ| VM_MAYREAD |VM_RESERVED;
vma->vm_page_prot = PAGE_READONLY; /* XXX may need to change */
vma->vm_flags = VM_READ| VM_MAYREAD |VM_RESERVED;
vma->vm_page_prot = PAGE_READONLY; /* XXX may need to change */
@@
-2345,8
+2345,6
@@
pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
goto error;
}
goto error;
}
- get_file(filp);
-
/*
* now insert the vma in the vm list for the process, must be
* done with mmap lock held
/*
* now insert the vma in the vm list for the process, must be
* done with mmap lock held
@@
-4782,7
+4780,7
@@
recheck:
asmlinkage long
sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
{
asmlinkage long
sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
{
- struct f
ile *file = NULL
;
+ struct f
d f = {NULL, 0}
;
pfm_context_t *ctx = NULL;
unsigned long flags = 0UL;
void *args_k = NULL;
pfm_context_t *ctx = NULL;
unsigned long flags = 0UL;
void *args_k = NULL;
@@
-4879,17
+4877,17
@@
restart_args:
ret = -EBADF;
ret = -EBADF;
- f
ile = f
get(fd);
- if (unlikely(file == NULL)) {
+ f
= fd
get(fd);
+ if (unlikely(f
.f
ile == NULL)) {
DPRINT(("invalid fd %d\n", fd));
goto error_args;
}
DPRINT(("invalid fd %d\n", fd));
goto error_args;
}
- if (unlikely(PFM_IS_FILE(file) == 0)) {
+ if (unlikely(PFM_IS_FILE(f
.f
ile) == 0)) {
DPRINT(("fd %d not related to perfmon\n", fd));
goto error_args;
}
DPRINT(("fd %d not related to perfmon\n", fd));
goto error_args;
}
- ctx = file->private_data;
+ ctx = f
.f
ile->private_data;
if (unlikely(ctx == NULL)) {
DPRINT(("no context for fd %d\n", fd));
goto error_args;
if (unlikely(ctx == NULL)) {
DPRINT(("no context for fd %d\n", fd));
goto error_args;
@@
-4919,8
+4917,8
@@
abort_locked:
if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT;
error_args:
if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT;
error_args:
- if (file)
- f
put(file
);
+ if (f
.f
ile)
+ f
dput(f
);
kfree(args_k);
kfree(args_k);
This page took
0.029925 seconds
and
5
git commands to generate.