diff options
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
| -rw-r--r-- | arch/ia64/kernel/perfmon.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index f1201ac8a116..1650353e3f77 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/pagemap.h> | 38 | #include <linux/pagemap.h> |
| 39 | #include <linux/mount.h> | 39 | #include <linux/mount.h> |
| 40 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
| 41 | #include <linux/rcupdate.h> | ||
| 41 | 42 | ||
| 42 | #include <asm/errno.h> | 43 | #include <asm/errno.h> |
| 43 | #include <asm/intrinsics.h> | 44 | #include <asm/intrinsics.h> |
| @@ -496,7 +497,7 @@ typedef struct { | |||
| 496 | static pfm_stats_t pfm_stats[NR_CPUS]; | 497 | static pfm_stats_t pfm_stats[NR_CPUS]; |
| 497 | static pfm_session_t pfm_sessions; /* global sessions information */ | 498 | static pfm_session_t pfm_sessions; /* global sessions information */ |
| 498 | 499 | ||
| 499 | static spinlock_t pfm_alt_install_check = SPIN_LOCK_UNLOCKED; | 500 | static DEFINE_SPINLOCK(pfm_alt_install_check); |
| 500 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; | 501 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; |
| 501 | 502 | ||
| 502 | static struct proc_dir_entry *perfmon_dir; | 503 | static struct proc_dir_entry *perfmon_dir; |
| @@ -2217,15 +2218,17 @@ static void | |||
| 2217 | pfm_free_fd(int fd, struct file *file) | 2218 | pfm_free_fd(int fd, struct file *file) |
| 2218 | { | 2219 | { |
| 2219 | struct files_struct *files = current->files; | 2220 | struct files_struct *files = current->files; |
| 2221 | struct fdtable *fdt = files_fdtable(files); | ||
| 2220 | 2222 | ||
| 2221 | /* | 2223 | /* |
| 2222 | * there ie no fd_uninstall(), so we do it here | 2224 | * there ie no fd_uninstall(), so we do it here |
| 2223 | */ | 2225 | */ |
| 2224 | spin_lock(&files->file_lock); | 2226 | spin_lock(&files->file_lock); |
| 2225 | files->fd[fd] = NULL; | 2227 | rcu_assign_pointer(fdt->fd[fd], NULL); |
| 2226 | spin_unlock(&files->file_lock); | 2228 | spin_unlock(&files->file_lock); |
| 2227 | 2229 | ||
| 2228 | if (file) put_filp(file); | 2230 | if (file) |
| 2231 | put_filp(file); | ||
| 2229 | put_unused_fd(fd); | 2232 | put_unused_fd(fd); |
| 2230 | } | 2233 | } |
| 2231 | 2234 | ||
