diff options
author | Steve French <smfrench@gmail.com> | 2012-10-07 21:00:47 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-10-07 21:00:47 -0400 |
commit | b7a10626c8bc88fd097a8bb4486c89558f89320c (patch) | |
tree | ac214a461568529ca0d898cee86f24ba53b7328e /fs/cifs/transport.c | |
parent | 612a9aab56a93533e76e3ad91642db7033e03b69 (diff) |
[CIFS] WARN_ON_ONCE if kernel_sendmsg() returns -ENOSPC
kernel_sendmsg() is less likely to return -ENOSPC and it might be
a bug to do so. However, in the past there might have been cases
where a -ENOSPC was returned from a low level driver.
Add a WARN_ON_ONCE() to ensure that it is safe to assume that -ENOSPC
is no longer returned. This -ENOSPC specific handling will be removed
once we are sure it is no longer returned.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 2126ab185045..76d974c952fe 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -183,6 +183,12 @@ smb_send_kvec(struct TCP_Server_Info *server, struct kvec *iov, size_t n_vec, | |||
183 | rc = kernel_sendmsg(ssocket, &smb_msg, &iov[first_vec], | 183 | rc = kernel_sendmsg(ssocket, &smb_msg, &iov[first_vec], |
184 | n_vec - first_vec, remaining); | 184 | n_vec - first_vec, remaining); |
185 | if (rc == -ENOSPC || rc == -EAGAIN) { | 185 | if (rc == -ENOSPC || rc == -EAGAIN) { |
186 | /* | ||
187 | * Catch if a low level driver returns -ENOSPC. This | ||
188 | * WARN_ON will be removed by 3.10 if no one reports | ||
189 | * seeing this. | ||
190 | */ | ||
191 | WARN_ON_ONCE(rc == -ENOSPC); | ||
186 | i++; | 192 | i++; |
187 | if (i >= 14 || (!server->noblocksnd && (i > 2))) { | 193 | if (i >= 14 || (!server->noblocksnd && (i > 2))) { |
188 | cERROR(1, "sends on sock %p stuck for 15 " | 194 | cERROR(1, "sends on sock %p stuck for 15 " |