Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:59884 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760304Ab2EJSoH (ORCPT ); Thu, 10 May 2012 14:44:07 -0400 Received: from vmwexceht05-prd.hq.netapp.com (vmwexceht05-prd.hq.netapp.com [10.106.77.35]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q4AIi6h4008779 for ; Thu, 10 May 2012 11:44:06 -0700 (PDT) From: "Myklebust, Trond" To: "Schumaker, Bryan" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH v3 06/14] NFS: Create a common xdev_mount() function Date: Thu, 10 May 2012 18:44:05 +0000 Message-ID: <1336675445.3962.9.camel@lade.trondhjem.org> References: <1336663205-23886-1-git-send-email-bjschuma@netapp.com> <1336663205-23886-7-git-send-email-bjschuma@netapp.com> In-Reply-To: <1336663205-23886-7-git-send-email-bjschuma@netapp.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVGh1LCAyMDEyLTA1LTEwIGF0IDExOjE5IC0wNDAwLCBianNjaHVtYUBuZXRhcHAuY29tIHdy b3RlOg0KPiBGcm9tOiBCcnlhbiBTY2h1bWFrZXIgPGJqc2NodW1hQG5ldGFwcC5jb20+DQo+IA0K PiBUaGUgb25seSBkaWZmZXJlbmNlIGJldHdlZW4gbmZzX3hkZXZfbW91bnQoKSBhbmQgbmZzNF94 ZGV2X21vdW50KCkgaXMgdGhlDQo+IHVuc2hhcmVkIGZsYWcsIHNvIEkgcGFzcyB0aGlzIGFzIGFu IG5mc19tb3VudF9pbmZvIHBhcmFtZXRlciBzbyB3ZSBjYW4NCj4gc2hhcmUgbW9yZSBjb2RlLg0K DQpUaGUgY2hhbmdlbG9nIHNlZW1zIG5vdCB0byByZWxhdGUgdG8gdGhlIGFjdHVhbCBwYXRjaDog eW91IGFyZSBh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