aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-09-09 13:30:15 -0500
committerSteve French <stfrench@microsoft.com>2019-09-16 11:43:38 -0500
commit10328c44cc1506dd82fd835efcaafd519866c464 (patch)
tree52a8a71596ab8a61c27fa1f7d19ddbf6728d2492 /fs/cifs/smb2ops.c
parentcifs: add a helper to find an existing readable handle to a file (diff)
downloadlinux-dev-10328c44cc1506dd82fd835efcaafd519866c464.tar.xz
linux-dev-10328c44cc1506dd82fd835efcaafd519866c464.zip
smb3: only offload decryption of read responses if multiple requests
No point in offloading read decryption if no other requests on the wire Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 1cfb8d518132..72b3e39d7f4f 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -4121,7 +4121,7 @@ receive_encrypted_read(struct TCP_Server_Info *server, struct mid_q_entry **mid,
* use more cores decrypting which can be expensive
*/
- if ((server->min_offload) &&
+ if ((server->min_offload) && (server->in_flight > 1) &&
(server->pdu_size >= server->min_offload)) {
dw = kmalloc(sizeof(struct smb2_decrypt_work), GFP_KERNEL);
if (dw == NULL)