diff options
Diffstat (limited to 'net/9p/client.c')
-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 67717f69412e..f4e6c05b3c68 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) | |||
613 | { | 613 | { |
614 | int err; | 614 | int err; |
615 | struct p9_fid *fid; | 615 | struct p9_fid *fid; |
616 | unsigned long flags; | ||
616 | 617 | ||
617 | P9_DPRINTK(P9_DEBUG_FID, "clnt %p\n", clnt); | 618 | P9_DPRINTK(P9_DEBUG_FID, "clnt %p\n", clnt); |
618 | fid = kmalloc(sizeof(struct p9_fid), GFP_KERNEL); | 619 | fid = kmalloc(sizeof(struct p9_fid), GFP_KERNEL); |
@@ -632,9 +633,9 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt) | |||
632 | fid->clnt = clnt; | 633 | fid->clnt = clnt; |
633 | fid->aux = NULL; | 634 | fid->aux = NULL; |
634 | 635 | ||
635 | spin_lock(&clnt->lock); | 636 | spin_lock_irqsave(&clnt->lock, flags); |
636 | list_add(&fid->flist, &clnt->fidlist); | 637 | list_add(&fid->flist, &clnt->fidlist); |
637 | spin_unlock(&clnt->lock); | 638 | spin_unlock_irqrestore(&clnt->lock, flags); |
638 | 639 | ||
639 | return fid; | 640 | return fid; |
640 | 641 | ||
@@ -646,13 +647,14 @@ error: | |||
646 | static void p9_fid_destroy(struct p9_fid *fid) | 647 | static void p9_fid_destroy(struct p9_fid *fid) |
647 | { | 648 | { |
648 | struct p9_client *clnt; | 649 | struct p9_client *clnt; |
650 | unsigned long flags; | ||
649 | 651 | ||
650 | P9_DPRINTK(P9_DEBUG_FID, "fid %d\n", fid->fid); | 652 | P9_DPRINTK(P9_DEBUG_FID, "fid %d\n", fid->fid); |
651 | clnt = fid->clnt; | 653 | clnt = fid->clnt; |
652 | p9_idpool_put(fid->fid, clnt->fidpool); | 654 | p9_idpool_put(fid->fid, clnt->fidpool); |
653 | spin_lock(&clnt->lock); | 655 | spin_lock_irqsave(&clnt->lock, flags); |
654 | list_del(&fid->flist); | 656 | list_del(&fid->flist); |
655 | spin_unlock(&clnt->lock); | 657 | spin_unlock_irqrestore(&clnt->lock, flags); |
656 | kfree(fid); | 658 | kfree(fid); |
657 | } | 659 | } |
658 | 660 | ||