aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/util.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-03 18:29:50 -0400
committerEric Van Hensbergen <ericvh@opteron.9grid.us>2008-05-14 20:23:26 -0400
commitd0c447180bfcb1db8d59e6ddb10f0346bd7d29e9 (patch)
tree896887bfdb1cf7bf8dbb1212bb7526f5149cdad7 /net/9p/util.c
parent728fc4ef17748042d9c71144aa339ed9c68e8b01 (diff)
9p: fix flags length in net
Some files in the net/9p directory uses "int" for flags. This can cause hard to find bugs on some architectures. This patch converts the flags to use "long" instead. This bug was discovered by doing an allyesconfig make on the -rt kernel where checks are done to ensure all flags are of size sizeof(long). Signed-off-by: Steven Rostedt <srostedt@redhat.com> Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/util.c')
-rw-r--r--net/9p/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/util.c b/net/9p/util.c
index 4d5646045330..958fc58cd1ff 100644
--- a/net/9p/util.c
+++ b/net/9p/util.c
@@ -88,7 +88,7 @@ int p9_idpool_get(struct p9_idpool *p)
88{ 88{
89 int i = 0; 89 int i = 0;
90 int error; 90 int error;
91 unsigned int flags; 91 unsigned long flags;
92 92
93retry: 93retry:
94 if (idr_pre_get(&p->pool, GFP_KERNEL) == 0) 94 if (idr_pre_get(&p->pool, GFP_KERNEL) == 0)
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(p9_idpool_get);
120 120
121void p9_idpool_put(int id, struct p9_idpool *p) 121void p9_idpool_put(int id, struct p9_idpool *p)
122{ 122{
123 unsigned int flags; 123 unsigned long flags;
124 spin_lock_irqsave(&p->lock, flags); 124 spin_lock_irqsave(&p->lock, flags);
125 idr_remove(&p->pool, id); 125 idr_remove(&p->pool, id);
126 spin_unlock_irqrestore(&p->lock, flags); 126 spin_unlock_irqrestore(&p->lock, flags);