diff options
author | Steve French <smfrench@gmail.com> | 2014-09-15 00:27:09 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-09-15 04:04:50 -0400 |
commit | da80659d4aa758dc6935b10ec64513f0b67bc969 (patch) | |
tree | 0ed0b999b3330a489c6c2b6b0c118c3b305d0c5f | |
parent | 2ae83bf93882d1ec0cd775c489bd1bee611f792e (diff) |
[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>
-rw-r--r-- | fs/cifs/link.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 68559fd557fb..a5c2812ead68 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -213,8 +213,12 @@ create_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon, | |||
213 | if (rc) | 213 | if (rc) |
214 | goto out; | 214 | goto out; |
215 | 215 | ||
216 | rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, cifs_sb, | 216 | if (tcon->ses->server->ops->create_mf_symlink) |
217 | fromName, buf, &bytes_written); | 217 | rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, |
218 | cifs_sb, fromName, buf, &bytes_written); | ||
219 | else | ||
220 | rc = -EOPNOTSUPP; | ||
221 | |||
218 | if (rc) | 222 | if (rc) |
219 | goto out; | 223 | goto out; |
220 | 224 | ||