Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da80659d authored by Steve French's avatar Steve French
Browse files

[SMB3] Fix oops when creating symlinks on smb3



We were not checking for symlink support properly for SMB2/SMB3
mounts so could oops when mounted with mfsymlinks when try
to create symlink when mfsymlinks on smb2/smb3 mounts

Signed-off-by: default avatarSteve French <smfrench@gmail.com>
Cc: <stable@vger.kernel.org> # 3.14+
CC: Sachin Prabhu <sprabhu@redhat.com>
parent 2ae83bf9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -213,8 +213,12 @@ create_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon,
	if (rc)
		goto out;

	rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, cifs_sb,
					fromName, buf, &bytes_written);
	if (tcon->ses->server->ops->create_mf_symlink)
		rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon,
					cifs_sb, fromName, buf, &bytes_written);
	else
		rc = -EOPNOTSUPP;

	if (rc)
		goto out;