summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorSteve French2014-02-08 03:45:12 +0100
committerSteve French2014-02-08 03:47:00 +0100
commit4a5c80d7b5615be8098f9d5da97d166afc318abc (patch)
treeff3e40a816442722056805cc0cc1844051a30988 /fs/cifs/cifsglob.h
parentcifs: use a flexarray in cifs_writedata (diff)
downloadkernel-qcow2-linux-4a5c80d7b5615be8098f9d5da97d166afc318abc.tar.gz
kernel-qcow2-linux-4a5c80d7b5615be8098f9d5da97d166afc318abc.tar.xz
kernel-qcow2-linux-4a5c80d7b5615be8098f9d5da97d166afc318abc.zip
[CIFS] clean up page array when uncached write send fails
In the event that a send fails in an uncached write, or we end up needing to reissue it (-EAGAIN case), we'll kfree the wdata but the pages currently leak. Fix this by adding a new kref release routine for uncached writedata that releases the pages, and have the uncached codepaths use that. [original patch by Jeff modified to fix minor formatting problems] Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index d6a031ed391b..86dc28c7aa5c 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -323,7 +323,8 @@ struct smb_version_operations {
/* async read from the server */
int (*async_readv)(struct cifs_readdata *);
/* async write to the server */
- int (*async_writev)(struct cifs_writedata *);
+ int (*async_writev)(struct cifs_writedata *,
+ void (*release)(struct kref *));
/* sync read from the server */
int (*sync_read)(const unsigned int, struct cifsFileInfo *,
struct cifs_io_parms *, unsigned int *, char **,