diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-10-23 16:31:02 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2008-11-05 13:19:06 -0600 |
commit | cac23d6505546f4cfa42d949ec46d431a44bd39c (patch) | |
tree | bdeec0c970ef4cb1ebcb6e479eff0429f6381fed /net/9p | |
parent | 517ac45af4b55913587279d89001171c222f22e7 (diff) | |
download | kernel_samsung_tuna-cac23d6505546f4cfa42d949ec46d431a44bd39c.zip kernel_samsung_tuna-cac23d6505546f4cfa42d949ec46d431a44bd39c.tar.gz kernel_samsung_tuna-cac23d6505546f4cfa42d949ec46d431a44bd39c.tar.bz2 |
9p: Make all client spin locks IRQ safe
The client lock must be IRQ safe. Some of the lock acquisition paths
took regular spin locks.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/client.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 67717f6..f4e6c05 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -613,6 +613,7 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt) { int err; struct p9_fid *fid; + unsigned long flags; P9_DPRINTK(P9_DEBUG_FID, "clnt %p\n", clnt); fid = kmalloc(sizeof(struct p9_fid), GFP_KERNEL); @@ -632,9 +633,9 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt) fid->clnt = clnt; fid->aux = NULL; - spin_lock(&clnt->lock); + spin_lock_irqsave(&clnt->lock, flags); list_add(&fid->flist, &clnt->fidlist); - spin_unlock(&clnt->lock); + spin_unlock_irqrestore(&clnt->lock, flags); return fid; @@ -646,13 +647,14 @@ error: static void p9_fid_destroy(struct p9_fid *fid) { struct p9_client *clnt; + unsigned long flags; P9_DPRINTK(P9_DEBUG_FID, "fid %d\n", fid->fid); clnt = fid->clnt; p9_idpool_put(fid->fid, clnt->fidpool); - spin_lock(&clnt->lock); + spin_lock_irqsave(&clnt->lock, flags); list_del(&fid->flist); - spin_unlock(&clnt->lock); + spin_unlock_irqrestore(&clnt->lock, flags); kfree(fid); } |