Skip to content

Commit

Permalink
[SMB3] Fix oops when creating symlinks on smb3
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]> # 3.14+
CC: Sachin Prabhu <[email protected]>
  • Loading branch information
smfrench committed Sep 15, 2014
1 parent 2ae83bf commit da80659
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/cifs/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit da80659

Please sign in to comment.