All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
Subject: [PATCH v1 3/6] fs/cifs: always use ipc for DFS resolving ioctls
Date: Tue,  8 Nov 2016 17:33:23 +0100	[thread overview]
Message-ID: <1478622806-19636-4-git-send-email-aaptel@suse.com> (raw)
In-Reply-To: <1478622806-19636-1-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>

since we cannot access the ipc tcon object, force the use of the ipc tid
when crafting DFS resolving ioctl.

Signed-off-by: Aurelien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
---
 fs/cifs/smb2pdu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 5ca5ea46..6d5b8db 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1645,6 +1645,10 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
 	if (rc)
 		return rc;
 
+	/* XXX: how can we access the tcon of the IPC of the host? */
+	if (opcode == FSCTL_DFS_GET_REFERRALS) {
+		req->hdr.TreeId = ses->ipc_tid;
+	}
 	req->CtlCode = cpu_to_le32(opcode);
 	req->PersistentFileId = persistent_fid;
 	req->VolatileFileId = volatile_fid;
-- 
2.1.4

  parent reply	other threads:[~2016-11-08 16:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 16:33 [PATCH v1 0/6] Add support for DFS in smb2+ Aurelien Aptel
     [not found] ` <1478622806-19636-1-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>
2016-11-08 16:33   ` [PATCH v1 1/6] fs/cifs: add smb2 fsctl payloads for DFS resolving Aurelien Aptel
2016-11-08 16:33   ` [PATCH v1 2/6] fs/cifs: implement get_dfs_refer for smb2 Aurelien Aptel
     [not found]     ` <1478622806-19636-3-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>
2016-11-11  0:42       ` Pavel Shilovsky
2016-11-08 16:33   ` Aurelien Aptel [this message]
     [not found]     ` <1478622806-19636-4-git-send-email-aaptel-IBi9RG/b67k@public.gmane.org>
2016-11-11  0:46       ` [PATCH v1 3/6] fs/cifs: always use ipc for DFS resolving ioctls Pavel Shilovsky
2016-11-08 16:33   ` [PATCH v1 4/6] fs/cifs: add build_path_from_dentry_optional_prefix() Aurelien Aptel
2016-11-08 16:33   ` [PATCH v1 5/6] fs/cifs: always use tree name prefix for DFS resolving Aurelien Aptel
2016-11-08 16:33   ` [PATCH v1 6/6] fs/cifs: enable get_dfs_refer operation for smb2+ Aurelien Aptel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478622806-19636-4-git-send-email-aaptel@suse.com \
    --to=aaptel-ibi9rg/b67k@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.