aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index e3e5bf4469ce..a037a29f3f0e 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -533,7 +533,12 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
533 533
534 P9_DPRINTK(P9_DEBUG_MUX, "client %p op %d\n", c, type); 534 P9_DPRINTK(P9_DEBUG_MUX, "client %p op %d\n", c, type);
535 535
536 if (c->status != Connected) 536 /* we allow for any status other than disconnected */
537 if (c->status == Disconnected)
538 return ERR_PTR(-EIO);
539
540 /* if status is begin_disconnected we allow only clunk request */
541 if ((c->status == BeginDisconnect) && (type != P9_TCLUNK))
537 return ERR_PTR(-EIO); 542 return ERR_PTR(-EIO);
538 543
539 if (signal_pending(current)) { 544 if (signal_pending(current)) {
@@ -799,8 +804,10 @@ void p9_client_destroy(struct p9_client *clnt)
799 804
800 v9fs_put_trans(clnt->trans_mod); 805 v9fs_put_trans(clnt->trans_mod);
801 806
802 list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist) 807 list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist) {
808 printk(KERN_INFO "Found fid %d not clunked\n", fid->fid);
803 p9_fid_destroy(fid); 809 p9_fid_destroy(fid);
810 }
804 811
805 if (clnt->fidpool) 812 if (clnt->fidpool)
806 p9_idpool_destroy(clnt->fidpool); 813 p9_idpool_destroy(clnt->fidpool);
@@ -818,6 +825,13 @@ void p9_client_disconnect(struct p9_client *clnt)
818} 825}
819EXPORT_SYMBOL(p9_client_disconnect); 826EXPORT_SYMBOL(p9_client_disconnect);
820 827
828void p9_client_begin_disconnect(struct p9_client *clnt)
829{
830 P9_DPRINTK(P9_DEBUG_9P, "clnt %p\n", clnt);
831 clnt->status = BeginDisconnect;
832}
833EXPORT_SYMBOL(p9_client_begin_disconnect);
834
821struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, 835struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid,
822 char *uname, u32 n_uname, char *aname) 836 char *uname, u32 n_uname, char *aname)
823{ 837{