summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-02-05 16:52:11 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 08:34:53 +0100
commit3edf85591fb5d2738ed5daa3c8cc16332bb87eb9 (patch)
tree2facbba80b0b25b918c13cc9ea9c39a18720b8f7
parentf3c539fbfa566b04f75ef728c1b1af3eb880c7dd (diff)
downloadlinux-stable-3edf85591fb5d2738ed5daa3c8cc16332bb87eb9.tar.gz
linux-stable-3edf85591fb5d2738ed5daa3c8cc16332bb87eb9.tar.bz2
linux-stable-3edf85591fb5d2738ed5daa3c8cc16332bb87eb9.zip
cifs: log warning message (once) if out of disk space
[ Upstream commit d6fd41905ec577851734623fb905b1763801f5ef ] We ran into a confusing problem where an application wasn't checking return code on close and so user didn't realize that the application ran out of disk space. log a warning message (once) in these cases. For example: [ 8407.391909] Out of space writing to \\oleg-server\small-share Signed-off-by: Steve French <stfrench@microsoft.com> Reported-by: Oleg Kravtsov <oleg@tuxera.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/cifs/smb2pdu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 0d4e4d97e6cf..e2d2b749c8f3 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3425,6 +3425,9 @@ smb2_writev_callback(struct mid_q_entry *mid)
wdata->cfile->fid.persistent_fid,
tcon->tid, tcon->ses->Suid, wdata->offset,
wdata->bytes, wdata->result);
+ if (wdata->result == -ENOSPC)
+ printk_once(KERN_WARNING "Out of space writing to %s\n",
+ tcon->treeName);
} else
trace_smb3_write_done(0 /* no xid */,
wdata->cfile->fid.persistent_fid,