From: Pavel Shilovsky Date: Sat, 26 Jan 2019 20:21:32 +0000 (-0800) Subject: CIFS: Do not count -ENODATA as failure for query directory X-Git-Tag: v4.14.98~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e6bb03a0b87addc736cfa78e6b5ed32a0a8baa8;p=platform%2Fkernel%2Flinux-exynos.git CIFS: Do not count -ENODATA as failure for query directory commit 8e6e72aeceaaed5aeeb1cb43d3085de7ceb14f79 upstream. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French CC: Stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index c0f8087..fd2d199 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3071,8 +3071,8 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, rsp->hdr.sync_hdr.Status == STATUS_NO_MORE_FILES) { srch_inf->endOfSearch = true; rc = 0; - } - cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE); + } else + cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE); goto qdir_exit; }