diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-09-29 19:51:11 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-06 12:12:49 -0400 |
commit | 13cfb7334eb6fd0fc06da5589aea1e947791f1d6 (patch) | |
tree | 56d884f6a5dbcf8b259247fdad55c9158bd4d865 /fs/cifs/readdir.c | |
parent | 7ffec372458d163492e56e663a1b3a2d7be0a0a2 (diff) |
cifs: have cifsFileInfo hold a reference to a tlink rather than tcon pointer
cifsFileInfo needs a pointer to a tcon, but it doesn't currently hold a
reference to it. Change it to keep a pointer to a tcon_link instead and
hold a reference to it.
That will keep the tcon from being freed until the file is closed.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 170047cf4522..1f0bd0f972d4 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -245,7 +245,7 @@ static int initiate_cifs_search(const int xid, struct file *file) | |||
245 | cifsFile = file->private_data; | 245 | cifsFile = file->private_data; |
246 | cifsFile->invalidHandle = true; | 246 | cifsFile->invalidHandle = true; |
247 | cifsFile->srch_inf.endOfSearch = false; | 247 | cifsFile->srch_inf.endOfSearch = false; |
248 | cifsFile->tcon = pTcon; | 248 | cifsFile->tlink = cifs_get_tlink(tlink); |
249 | 249 | ||
250 | full_path = build_path_from_dentry(file->f_path.dentry); | 250 | full_path = build_path_from_dentry(file->f_path.dentry); |
251 | if (full_path == NULL) { | 251 | if (full_path == NULL) { |
@@ -838,7 +838,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
838 | CIFSFindClose(xid, pTcon, cifsFile->netfid); | 838 | CIFSFindClose(xid, pTcon, cifsFile->netfid); |
839 | } */ | 839 | } */ |
840 | 840 | ||
841 | pTcon = cifsFile->tcon; | 841 | pTcon = tlink_tcon(cifsFile->tlink); |
842 | rc = find_cifs_entry(xid, pTcon, file, | 842 | rc = find_cifs_entry(xid, pTcon, file, |
843 | ¤t_entry, &num_to_fill); | 843 | ¤t_entry, &num_to_fill); |
844 | if (rc) { | 844 | if (rc) { |