Commit c910b5d0 authored by Stephen Lord's avatar Stephen Lord Committed by Stephen Lord

[XFS] Either handle preemption with get/put or not, but don't

get without a put!  Fix code for preemptable kernels.

SGI Modid: 2.5.x-xfs:slinx:159379a
parent ac505407
...@@ -130,9 +130,11 @@ struct xfsstats { ...@@ -130,9 +130,11 @@ struct xfsstats {
DECLARE_PER_CPU(struct xfsstats, xfsstats); DECLARE_PER_CPU(struct xfsstats, xfsstats);
# define XFS_STATS_INC(count) ( get_cpu_var(xfsstats).count++ ) /* We don't disable preempt, not too worried about poking the
# define XFS_STATS_DEC(count) ( get_cpu_var(xfsstats).count-- ) * wrong cpu's stat for now */
# define XFS_STATS_ADD(count, inc) ( get_cpu_var(xfsstats).count += (inc) ) #define XFS_STATS_INC(count) (__get_cpu_var(xfsstats).count++)
#define XFS_STATS_DEC(count) (__get_cpu_var(xfsstats).count--)
#define XFS_STATS_ADD(count, inc) (__get_cpu_var(xfsstats).count += (inc))
extern void xfs_init_procfs(void); extern void xfs_init_procfs(void);
extern void xfs_cleanup_procfs(void); extern void xfs_cleanup_procfs(void);
......
...@@ -123,7 +123,9 @@ struct pbstats { ...@@ -123,7 +123,9 @@ struct pbstats {
DECLARE_PER_CPU(struct pbstats, pbstats); DECLARE_PER_CPU(struct pbstats, pbstats);
#define PB_STATS_INC(count) ( get_cpu_var(pbstats).count++ ) /* We don't disable preempt, not too worried about poking the
* wrong cpu's stat for now */
#define PB_STATS_INC(count) (__get_cpu_var(pbstats).count++)
#ifndef STATIC #ifndef STATIC
# define STATIC static # define STATIC static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment