diff options
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index f1201ac8a116..d71731ee5b61 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; |
@@ -573,7 +574,7 @@ pfm_protect_ctx_ctxsw(pfm_context_t *x) | |||
573 | return 0UL; | 574 | return 0UL; |
574 | } | 575 | } |
575 | 576 | ||
576 | static inline unsigned long | 577 | static inline void |
577 | pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) | 578 | pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) |
578 | { | 579 | { |
579 | spin_unlock(&(x)->ctx_lock); | 580 | spin_unlock(&(x)->ctx_lock); |
@@ -2217,15 +2218,18 @@ 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; | ||
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 | fdt = files_fdtable(files); |
2228 | rcu_assign_pointer(fdt->fd[fd], NULL); | ||
2226 | spin_unlock(&files->file_lock); | 2229 | spin_unlock(&files->file_lock); |
2227 | 2230 | ||
2228 | if (file) put_filp(file); | 2231 | if (file) |
2232 | put_filp(file); | ||
2229 | put_unused_fd(fd); | 2233 | put_unused_fd(fd); |
2230 | } | 2234 | } |
2231 | 2235 | ||