summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2014-08-26 19:04:44 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-17 09:04:01 -0700
commit659c639916aabca0165fbd9f8a966055a519e44b (patch)
treea01f06cb4912b62149f8a817c04bdc441c4f9efc
parent0c17ceb6f88f685e8a23019052891a198434aba8 (diff)
downloadlwn-659c639916aabca0165fbd9f8a966055a519e44b.tar.gz
lwn-659c639916aabca0165fbd9f8a966055a519e44b.zip
CIFS: Fix wrong restart readdir for SMB1
commit f736906a7669a77cf8cabdcbcf1dc8cb694e12ef upstream. The existing code calls server->ops->close() that is not right. This causes XFS test generic/310 to fail. Fix this by using server->ops->closedir() function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/cifs/readdir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 036279c064ff..87d125f682cd 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -585,8 +585,8 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon,
if (!cfile->srch_inf.endOfSearch && !cfile->invalidHandle) {
cfile->invalidHandle = true;
spin_unlock(&cifs_file_list_lock);
- if (server->ops->close)
- server->ops->close(xid, tcon, &cfile->fid);
+ if (server->ops->close_dir)
+ server->ops->close_dir(xid, tcon, &cfile->fid);
} else
spin_unlock(&cifs_file_list_lock);
if (cfile->srch_inf.ntwrk_buf_start) {