summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-23 19:40:55 +0100
committerJeff Layton <jlayton@redhat.com>2012-03-23 19:40:55 +0100
commitc2e8764009a0245fd24fcd2a63ffbf64236af016 (patch)
tree91f3a0503fda92f8c2cf06166adcd801ca98fe4a /fs/cifs/cifssmb.c
parentcifs: add pid field to cifs_writedata (diff)
downloadlinux-c2e8764009a0245fd24fcd2a63ffbf64236af016.tar.xz
linux-c2e8764009a0245fd24fcd2a63ffbf64236af016.zip
cifs: allow caller to specify completion op when allocating writedata
We'll need a different set of write completion ops when not writing out of the pagecache. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 61922142cf0d..21ff4bff6c89 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2035,7 +2035,7 @@ cifs_writev_requeue(struct cifs_writedata *wdata)
kref_put(&wdata->refcount, cifs_writedata_release);
}
-static void
+void
cifs_writev_complete(struct work_struct *work)
{
struct cifs_writedata *wdata = container_of(work,
@@ -2065,7 +2065,7 @@ cifs_writev_complete(struct work_struct *work)
}
struct cifs_writedata *
-cifs_writedata_alloc(unsigned int nr_pages)
+cifs_writedata_alloc(unsigned int nr_pages, work_func_t complete)
{
struct cifs_writedata *wdata;
@@ -2079,7 +2079,7 @@ cifs_writedata_alloc(unsigned int nr_pages)
wdata = kzalloc(sizeof(*wdata) +
sizeof(struct page *) * (nr_pages - 1), GFP_NOFS);
if (wdata != NULL) {
- INIT_WORK(&wdata->work, cifs_writev_complete);
+ INIT_WORK(&wdata->work, complete);
kref_init(&wdata->refcount);
}
return wdata;