From patchwork Tue Mar 17 16:44:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 12640 Received: from lists.samba.org (mail.samba.org [66.70.73.150]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2HGit0Y029310 for ; Tue, 17 Mar 2009 16:44:55 GMT Received: from dp.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id D1AF5163D34 for ; Tue, 17 Mar 2009 16:44:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on dp.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.8 tests=AWL,BAYES_00, DNS_FROM_RFC_POST,SPF_PASS autolearn=no version=3.1.7 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mail-bw0-f178.google.com (mail-bw0-f178.google.com [209.85.218.178]) by lists.samba.org (Postfix) with ESMTP id CA9ED163C31 for ; Tue, 17 Mar 2009 16:44:20 +0000 (GMT) Received: by mail-bw0-f178.google.com with SMTP id 26so155352bwz.20 for ; Tue, 17 Mar 2009 09:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=9Yv1dm63QimpswEKuAfddeAVmhqr9mGr5tVMUWFFgdo=; b=frRUJn6dGVSu/blbN5qLYX2enxyRfT/ZgCWPzpF3B8d9CzCNiBXomPYrO+o9t84dBh EYkPyECVxKLeRpt90163vDyFsDmvHCJ7RaUUUVv/MB6Xty/ur866YSVqOAWOgafIwNOu jEKGDSrJ/MEog+0PZqv7o0rlxRkjtedGx3GCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=tQ7bGXqVfFDhzqYZIN5sDLqI6ZLp5eh8rk26nPat0Eu+efDltbc+K8swgy3pJz1cKm uXFrQmlski0JClGFJjEfXyeKKmKjaWp0PvFVXDUv9GHvDeXCTkiELCbBa6Nj5f4Sggwr 6DMT1xYSHmrSDVsXlM4R0/53yg0uDcSOWC548= Received: by 10.223.126.66 with SMTP id b2mr192330fas.67.1237308275232; Tue, 17 Mar 2009 09:44:35 -0700 (PDT) Received: from l102796.int.cboss.ru ([195.245.232.177]) by mx.google.com with ESMTPS id z10sm10534831fka.33.2009.03.17.09.44.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Mar 2009 09:44:34 -0700 (PDT) Message-ID: <49BFD370.2050606@gmail.com> Date: Tue, 17 Mar 2009 19:44:32 +0300 From: Igor Mammedov User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: "linux-cifs-client@lists.samba.org" , Jeff Layton , Steve French Subject: [linux-cifs-client] [PATCH 3/3] [CIFS] Enable dfs submounts to handle remote referrals. X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces+patchwork-cifs-client=patchwork.kernel.org@lists.samba.org Errors-To: linux-cifs-client-bounces+patchwork-cifs-client=patchwork.kernel.org@lists.samba.org OOPs. Forgot to attach patch in previous email. Here it is. >From 73352e0f001d32812f9b18ae85aec35026b7a194 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Tue, 17 Mar 2009 19:00:30 +0300 Subject: [PATCH 3/3] [CIFS] Enable dfs submounts to handle remote referrals. Having remote dfs root support in cifs_mount, we can afford to pass into it UNC that is remote. Signed-off-by: Igor Mammedov --- fs/cifs/cifs_dfs_ref.c | 32 ++++++++++++++------------------ 1 files changed, 14 insertions(+), 18 deletions(-) diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 5fdbf8a..896b08f 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -341,27 +341,23 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) for (i = 0; i < num_referrals; i++) { dump_referral(referrals+i); - /* connect to a storage node */ - if (referrals[i].flags & DFSREF_STORAGE_SERVER) { - int len; - len = strlen(referrals[i].node_name); - if (len < 2) { - cERROR(1, ("%s: Net Address path too short: %s", + /* connect to a node */ + int len; + len = strlen(referrals[i].node_name); + if (len < 2) { + cERROR(1, ("%s: Net Address path too short: %s", __func__, referrals[i].node_name)); - rc = -EINVAL; - goto out_err; - } - mnt = cifs_dfs_do_refmount(nd->path.mnt, - nd->path.dentry, - referrals + i); - cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p", - __func__, + rc = -EINVAL; + goto out_err; + } + mnt = cifs_dfs_do_refmount(nd->path.mnt, + nd->path.dentry, referrals + i); + cFYI(1, ("%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__, referrals[i].node_name, mnt)); - /* complete mount procedure if we accured submount */ - if (!IS_ERR(mnt)) - break; - } + /* complete mount procedure if we accured submount */ + if (!IS_ERR(mnt)) + break; } /* we need it cause for() above could exit without valid submount */ -- 1.6.0.2