]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: use the correct length when pinning memory for direct I/O for write
authorLong Li <longli@microsoft.com>
Sun, 16 Dec 2018 23:17:04 +0000 (23:17 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 24 Dec 2018 04:42:19 +0000 (22:42 -0600)
commit727036a8227b621fb063a50d8b14ed988ea98ad0
treef605009680eb4847774849021be4f4fc045009ee
parenta3561496700551fa4bdf80edb0b7a79cae326b45
CIFS: use the correct length when pinning memory for direct I/O for write

The current code attempts to pin memory using the largest possible wsize
based on the currect SMB credits. This doesn't cause kernel oops but this
is not optimal as we may pin more pages then actually needed.

Fix this by only pinning what are needed for doing this write I/O.

Signed-off-by: Long Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Joey Pabalinas <joeypabalinas@gmail.com>
fs/cifs/file.c