On Mon, 2014-09-15 at 11:43 -0500, Steve French wrote: > When the protocol ops for create mf symlink was added > 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 on smb2/smb3 mounts rather than cifs > mount > > I will add a followon patch for mfsymlinks for SMB3 but in the > meantime need to avoid this possible oops. > > Signed-off-by: Steve French <smfrench@xxxxxxxxx> > Cc: <stable@xxxxxxxxxxxxxxx> # 3.14+ > CC: Sachin Prabhu <sprabhu@xxxxxxxxxx> > --- > fs/cifs/link.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > 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; > > ACK-ed by: Sachin Prabhu <sprabhu@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html