From: Steve French Date: Mon, 15 Sep 2014 04:27:09 +0000 (-0500) Subject: SMB3: Fix oops when creating symlinks on smb3 X-Git-Tag: v3.14.20~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d51afb094e833d28085f2a6c35b179260d981bb2;p=profile%2Fcommon%2Fkernel-common.git SMB3: Fix oops when creating symlinks on smb3 commit da80659d4aa758dc6935b10ec64513f0b67bc969 upstream. 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 CC: Sachin Prabhu Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 68559fd..a5c2812 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, 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;