Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297973
b: refs/heads/master
c: c2e8764
h: refs/heads/master
i:
  297971: 38fea7d
v: v3
  • Loading branch information
Jeff Layton committed Mar 23, 2012
1 parent e6d11e4 commit 0c8014f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe5f5d2e908957392aebbb852a6fb22885860d4b
refs/heads/master: c2e8764009a0245fd24fcd2a63ffbf64236af016
4 changes: 3 additions & 1 deletion trunk/fs/cifs/cifsproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ struct cifs_writedata {
};

int cifs_async_writev(struct cifs_writedata *wdata);
struct cifs_writedata *cifs_writedata_alloc(unsigned int nr_pages);
void cifs_writev_complete(struct work_struct *work);
struct cifs_writedata *cifs_writedata_alloc(unsigned int nr_pages,
work_func_t complete);
void cifs_writedata_release(struct kref *refcount);

#endif /* _CIFSPROTO_H */
6 changes: 3 additions & 3 deletions trunk/fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,8 @@ static int cifs_writepages(struct address_space *mapping,
tofind = min((cifs_sb->wsize / PAGE_CACHE_SIZE) - 1,
end - index) + 1;

wdata = cifs_writedata_alloc((unsigned int)tofind);
wdata = cifs_writedata_alloc((unsigned int)tofind,
cifs_writev_complete);
if (!wdata) {
rc = -ENOMEM;
break;
Expand Down

0 comments on commit 0c8014f

Please sign in to comment.