diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-05-16 07:13:17 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-05-16 21:13:30 -0400 |
commit | 6993f74a5bf836210e7f253d5ad3f76d73a95f51 (patch) | |
tree | 6b0cf7d6aed03e9d7d0b705cf7ba79792ab062a2 /fs/cifs/cifsproto.h | |
parent | 8d5ce4d23c79e0f9861b19fc534f5b2dc636f79c (diff) |
cifs: add refcounting to cifs_readdata structures
This isn't strictly necessary for the async readpages code, but the
uncached version will need to be able to collect the replies after
issuing the calls. Add a kref to cifs_readdata and use change the
code to take and put references appropriately.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index f309b43848fb..63e91c79564d 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -464,6 +464,7 @@ extern int SMBencrypt(unsigned char *passwd, const unsigned char *c8, | |||
464 | 464 | ||
465 | /* asynchronous read support */ | 465 | /* asynchronous read support */ |
466 | struct cifs_readdata { | 466 | struct cifs_readdata { |
467 | struct kref refcount; | ||
467 | struct cifsFileInfo *cfile; | 468 | struct cifsFileInfo *cfile; |
468 | struct address_space *mapping; | 469 | struct address_space *mapping; |
469 | __u64 offset; | 470 | __u64 offset; |
@@ -478,6 +479,7 @@ struct cifs_readdata { | |||
478 | struct kvec iov[1]; | 479 | struct kvec iov[1]; |
479 | }; | 480 | }; |
480 | 481 | ||
482 | void cifs_readdata_release(struct kref *refcount); | ||
481 | int cifs_async_readv(struct cifs_readdata *rdata); | 483 | int cifs_async_readv(struct cifs_readdata *rdata); |
482 | 484 | ||
483 | /* asynchronous write support */ | 485 | /* asynchronous write support */ |