Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118484
b: refs/heads/master
c: cac23d6
h: refs/heads/master
v: v3
  • Loading branch information
Tom Tucker authored and Eric Van Hensbergen committed Nov 5, 2008
1 parent ca62063 commit dfb2eee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 517ac45af4b55913587279d89001171c222f22e7
refs/heads/master: cac23d6505546f4cfa42d949ec46d431a44bd39c
10 changes: 6 additions & 4 deletions trunk/net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;

Expand All @@ -646,13 +647,14 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt)
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);
}

Expand Down

0 comments on commit dfb2eee

Please sign in to comment.