diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2014-08-18 18:49:57 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-08-17 12:08:39 +0200 |
commit | 52755808d4525f4d5b86d112d36ffc7a46f3fb48 (patch) | |
tree | 03c17278a39705295728b4b8f374ed1907faf0cb /fs/cifs/cifsglob.h | |
parent | [CIFS] Possible null ptr deref in SMB2_tcon (diff) | |
download | linux-52755808d4525f4d5b86d112d36ffc7a46f3fb48.tar.xz linux-52755808d4525f4d5b86d112d36ffc7a46f3fb48.zip |
CIFS: Fix SMB2 readdir error handling
SMB2 servers indicates the end of a directory search with
STATUS_NO_MORE_FILE error code that is not processed now.
This causes generic/257 xfstest to fail. Fix this by triggering
the end of search by this error code in SMB2_query_directory.
Also when negotiating CIFS protocol we tell the server to close
the search automatically at the end and there is no need to do
it itself. In the case of SMB2 protocol, we need to close it
explicitly - separate close directory checks for different
protocols.
Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index bc20a6ea6754..ce24c1fc2123 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -409,6 +409,8 @@ struct smb_version_operations { /* get mtu credits */ int (*wait_mtu_credits)(struct TCP_Server_Info *, unsigned int, unsigned int *, unsigned int *); + /* check if we need to issue closedir */ + bool (*dir_needs_close)(struct cifsFileInfo *); }; struct smb_version_values { |