提交 54e94ff9 编写于 作者: L Long Li 提交者: Steve French

CIFS: return correct errors when pinning memory failed for direct I/O

When pinning memory failed, we should return the correct error code and
rewind the SMB credits.
Reported-by: NMurphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: NLong Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Cc: Murphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 b6bc8a7b
......@@ -2632,6 +2632,9 @@ cifs_write_from_iter(loff_t offset, size_t len, struct iov_iter *from,
result, from->type,
from->iov_offset, from->count);
dump_stack();
rc = result;
add_credits_and_wake_if(server, credits, 0);
break;
}
cur_len = (size_t)result;
......@@ -3315,13 +3318,16 @@ cifs_send_async_read(loff_t offset, size_t len, struct cifsFileInfo *open_file,
cur_len, &start);
if (result < 0) {
cifs_dbg(VFS,
"couldn't get user pages (cur_len=%zd)"
"couldn't get user pages (rc=%zd)"
" iter type %d"
" iov_offset %zd count %zd\n",
result, direct_iov.type,
direct_iov.iov_offset,
direct_iov.count);
dump_stack();
rc = result;
add_credits_and_wake_if(server, credits, 0);
break;
}
cur_len = (size_t)result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册