mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
[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: Steve French <smfrench@gmail.com> Cc: <stable@vger.kernel.org> # 3.14+ CC: Sachin Prabhu <sprabhu@redhat.com>
This commit is contained in:
parent
2ae83bf938
commit
da80659d4a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user