cifs: We do not drop reference to tlink in CIFSCheckMFSymlink()
authorSachin Prabhu <sprabhu@redhat.com>
Mon, 25 Nov 2013 17:09:48 +0000 (17:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:25:13 +0000 (12:25 -0800)
commit52b9008f8d84d33ea77a9cd709735cee6fc0fa0d
tree7046efdef48b93fd0529796d8f2b3b40b7a612e6
parentf146ed94ea62e81c920a4b0fb22a54a33e64581e
cifs: We do not drop reference to tlink in CIFSCheckMFSymlink()

commit 750b8de6c4277d7034061e1da50663aa1b0479e4 upstream.

When we obtain tcon from cifs_sb, we use cifs_sb_tlink() to first obtain
tlink which also grabs a reference to it. We do not drop this reference
to tlink once we are done with the call.

The patch fixes this issue by instead passing tcon as a parameter and
avoids having to obtain a reference to the tlink. A lookup for the tcon
is already made in the calling functions and this way we avoid having to
re-run the lookup. This is also consistent with the argument list for
other similar calls for M-F symlinks.

We should also return an ENOSYS when we do not find a protocol specific
function to lookup the MF Symlink data.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsproto.h
fs/cifs/inode.c
fs/cifs/link.c