summaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2014-06-16 16:35:24 +0200
committerSteve French <smfrench@gmail.com>2014-08-01 06:11:15 +0200
commit6d81ed1ec22dbe96b85a5eb6422b2ab0556f7cbc (patch)
treed531d22859f8cd6a0c2836f548431cffb3900419 /fs/cifs/misc.c
parentMerge tag 'pm+acpi-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadlinux-6d81ed1ec22dbe96b85a5eb6422b2ab0556f7cbc.tar.xz
linux-6d81ed1ec22dbe96b85a5eb6422b2ab0556f7cbc.zip
cifs: replace code with free_rsp_buf()
The functionality provided by free_rsp_buf() is duplicated in a number of places. Replace these instances with a call to free_rsp_buf(). Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 3b0c62e622da..64997a04ab59 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -226,6 +226,15 @@ cifs_small_buf_release(void *buf_to_free)
return;
}
+void
+free_rsp_buf(int resp_buftype, void *rsp)
+{
+ if (resp_buftype == CIFS_SMALL_BUFFER)
+ cifs_small_buf_release(rsp);
+ else if (resp_buftype == CIFS_LARGE_BUFFER)
+ cifs_buf_release(rsp);
+}
+
/* NB: MID can not be set if treeCon not passed in, in that
case it is responsbility of caller to set the mid */
void