readdir cookie is stored with nfs41_open_state

fixes a memory leak that occurs when a readdir loop doesn't complete, since the cookie was only freed on the last readdir upcall.  by storing the cookie with nfs41_open_state, we can avoid passing the cookie to the driver and back, and not worry about having to free it separately

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-27 14:31:06 -04:00
parent 4930e7caca
commit 7e7f73766d
6 changed files with 33 additions and 57 deletions

View file

@ -76,6 +76,7 @@ typedef struct __nfs41_open_state {
nfs41_abs_path path;
nfs41_path_fh parent;
nfs41_path_fh file;
nfs41_readdir_cookie cookie;
struct __nfs41_session *session;
uint32_t type;
bool_t do_close;