Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit dd6f423

Browse files
piastrygregkh
authored andcommitted
CIFS: Fix wrong restart readdir for SMB1
commit f736906 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 <[email protected]> Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 24dd220 commit dd6f423

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: fs/cifs/readdir.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
596596
if (!cfile->srch_inf.endOfSearch && !cfile->invalidHandle) {
597597
cfile->invalidHandle = true;
598598
spin_unlock(&cifs_file_list_lock);
599-
if (server->ops->close)
600-
server->ops->close(xid, tcon, &cfile->fid);
599+
if (server->ops->close_dir)
600+
server->ops->close_dir(xid, tcon, &cfile->fid);
601601
} else
602602
spin_unlock(&cifs_file_list_lock);
603603
if (cfile->srch_inf.ntwrk_buf_start) {

0 commit comments

Comments
 (0)