Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbdFSTVD (ORCPT + 2 others); Mon, 19 Jun 2017 15:21:03 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:52067 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753108AbdFSSfl (ORCPT ); Mon, 19 Jun 2017 14:35:41 -0400 From: Willy Tarreau To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux@roeck-us.net Cc: Sachin Prabhu , Steve French , Willy Tarreau Subject: [PATCH 3.10 111/268] Fix regression which breaks DFS mounting Date: Mon, 19 Jun 2017 20:30:10 +0200 Message-Id: <1497897167-14556-112-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a In-Reply-To: <1497897167-14556-1-git-send-email-w@1wt.eu> References: <1497897167-14556-1-git-send-email-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Sachin Prabhu commit d171356ff11ab1825e456dfb979755e01b3c54a1 upstream. Patch a6b5058 results in -EREMOTE returned by is_path_accessible() in cifs_mount() to be ignored which breaks DFS mounting. Signed-off-by: Sachin Prabhu Reviewed-by: Aurelien Aptel Signed-off-by: Steve French Signed-off-by: Willy Tarreau --- fs/cifs/connect.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index cbdc5b0..417ce0a 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3622,15 +3622,16 @@ remote_path_check: kfree(full_path); goto mount_fail_check; } - - rc = cifs_are_all_path_components_accessible(server, - xid, tcon, cifs_sb, - full_path); - if (rc != 0) { - cifs_dbg(VFS, "cannot query dirs between root and final path, " - "enabling CIFS_MOUNT_USE_PREFIX_PATH\n"); - cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; - rc = 0; + if (rc != -EREMOTE) { + rc = cifs_are_all_path_components_accessible(server, + xid, tcon, cifs_sb, + full_path); + if (rc != 0) { + cifs_dbg(VFS, "cannot query dirs between root and final path, " + "enabling CIFS_MOUNT_USE_PREFIX_PATH\n"); + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; + rc = 0; + } } kfree(full_path); } -- 2.8.0.rc2.1.gbe9624a