From patchwork Wed Mar 17 17:02:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sripathi Kodi X-Patchwork-Id: 86475 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2HH31QJ026949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Mar 2010 17:03:38 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nrwdy-0005ll-8Z; Wed, 17 Mar 2010 17:02:54 +0000 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nrwdx-0005lX-2o for v9fs-developer@lists.sourceforge.net; Wed, 17 Mar 2010 17:02:53 +0000 Received-SPF: pass (sfi-mx-2.v28.ch3.sourceforge.com: domain of in.ibm.com designates 202.81.31.148 as permitted sender) client-ip=202.81.31.148; envelope-from=sripathik@in.ibm.com; helo=e23smtp06.au.ibm.com; Received: from e23smtp06.au.ibm.com ([202.81.31.148]) by sfi-mx-2.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Nrwdv-0002XR-QV for v9fs-developer@lists.sourceforge.net; Wed, 17 Mar 2010 17:02:53 +0000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp06.au.ibm.com (8.14.3/8.13.1) with ESMTP id o2HH2X9k001805 for ; Thu, 18 Mar 2010 04:02:33 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o2HGujOm1441810 for ; Thu, 18 Mar 2010 03:56:45 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o2HH2fbL024428 for ; Thu, 18 Mar 2010 04:02:41 +1100 Received: from localhost ([9.77.210.53]) by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o2HH2dK1024400 for ; Thu, 18 Mar 2010 04:02:40 +1100 Date: Wed, 17 Mar 2010 22:32:38 +0530 From: Sripathi Kodi To: v9fs-developer Message-ID: <20100317223238.42a57307@in.ibm.com> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.18.6; i686-redhat-linux-gnu) Mime-Version: 1.0 X-Spam-Score: -1.1 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record 0.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nrwdv-0002XR-QV Subject: [V9fs-developer] [PATCH] Fix setting of protocol flags in v9fs_session_info structure X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 17 Mar 2010 17:03:38 +0000 (UTC) diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 04e1937..0b78ae8 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -241,7 +241,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, list_add(&v9ses->slist, &v9fs_sessionlist); spin_unlock(&v9fs_sessionlist_lock); - v9ses->flags = V9FS_PROTO_2000U | V9FS_ACCESS_USER; + v9ses->flags = V9FS_ACCESS_USER; strcpy(v9ses->uname, V9FS_DEFUSER); strcpy(v9ses->aname, V9FS_DEFANAME); v9ses->uid = ~0; @@ -262,8 +262,10 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, goto error; } - if (!p9_is_proto_dotu(v9ses->clnt)) - v9ses->flags &= ~V9FS_PROTO_2000U; + if (p9_is_proto_dotl(v9ses->clnt)) + v9ses->flags |= V9FS_PROTO_2000L; + else if (p9_is_proto_dotu(v9ses->clnt)) + v9ses->flags |= V9FS_PROTO_2000U; v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ;