login
Header Space

 
 

9p: fix flags length in net

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Wednesday, May 14, 2008 - 10:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0c447...
Commit:     d0c447180bfcb1db8d59e6ddb10f0346bd7d29e9
Parent:     728fc4ef17748042d9c71144aa339ed9c68e8b01
Author:     Steven Rostedt <rostedt@goodmis.org>
AuthorDate: Sat May 3 17:29:50 2008 -0500
Committer:  Eric Van Hensbergen <ericvh@opteron.9grid.us>
CommitDate: Wed May 14 19:23:26 2008 -0500

    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>
---
 net/9p/trans_virtio.c |    2 +-
 net/9p/util.c         |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index d23ed60..42adc05 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -201,7 +201,7 @@ static void p9_virtio_close(struct p9_trans *trans)
 {
 	struct virtio_chan *chan = trans->priv;
 	int count;
-	unsigned int flags;
+	unsigned long flags;
 
 	spin_lock_irqsave(&chan->lock, flags);
 	p9_idpool_destroy(chan->tagpool);
diff --git a/net/9p/util.c b/net/9p/util.c
index 4d56460..958fc58 100644
--- a/net/9p/util.c
+++ b/net/9p/util.c
@@ -88,7 +88,7 @@ int p9_idpool_get(struct p9_idpool *p)
 {
 	int i = 0;
 	int error;
-	unsigned int flags;
+	unsigned long flags;
 
 retry:
 	if (idr_pre_get(&p->pool, GFP_KERNEL) == 0)
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(p9_idpool_get);
 
 void p9_idpool_put(int id, struct p9_idpool *p)
 {
-	unsigned int flags;
+	unsigned long flags;
 	spin_lock_irqsave(&p->lock, flags);
 	idr_remove(&p->pool, id);
 	spin_unlock_irqrestore(&p->lock, flags);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
9p: fix flags length in net, Linux Kernel Mailing List..., (Wed May 14, 10:59 pm)
speck-geostationary