All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix regression which breaks DFS mounting
@ 2016-09-06 12:22 Sachin Prabhu
       [not found] ` <1473164554-8062-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Sachin Prabhu @ 2016-09-06 12:22 UTC (permalink / raw)
  To: linux-cifs

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 <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 fs/cifs/connect.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7ae0328..9878943 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3661,14 +3661,16 @@ remote_path_check:
 			goto mount_fail_check;
 		}
 
-		rc = cifs_are_all_path_components_accessible(server,
+		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;
+			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.5.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-07 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 12:22 [PATCH] Fix regression which breaks DFS mounting Sachin Prabhu
     [not found] ` <1473164554-8062-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-06 18:29   ` Aurélien Aptel
     [not found]     ` <mps1t0wswyh.fsf-IBi9RG/b67k@public.gmane.org>
2016-09-07  9:02       ` Sachin Prabhu
     [not found]         ` <1473238975.3882.39.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-07 16:22           ` Aurélien Aptel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.