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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 31 May 2018 23:30:10 +0000 (00:30 +0100)
commit369813ffa51bbc02e0932fb2dd1e5f3374789dfa
tree1c6ce6215e907bc7f483f86254ea747696f4572d
parent50a44c165a67ff0b7e14d221af6cb6c1035aa90a
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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/cifs/file.c