]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: Fix missing put_xid in cifs_file_strict_mmap
authorMatthew Wilcox <mawilcox@microsoft.com>
Fri, 15 Dec 2017 20:48:32 +0000 (12:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:14:42 +0000 (20:14 +0100)
commit23dd6b8717fb32fd68be8ab6cd76743e298e4100
treeab495b45d5160979ba1571db1aad8638d6ac535b
parent796ab952d504dc938bbc331fa648a21ae96f6817
cifs: Fix missing put_xid in cifs_file_strict_mmap

commit f04a703c3d613845ae3141bfaf223489de8ab3eb upstream.

If cifs_zap_mapping() returned an error, we would return without putting
the xid that we got earlier.  Restructure cifs_file_strict_mmap() and
cifs_file_mmap() to be more similar to each other and have a single
point of return that always puts the xid.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/file.c