summaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-03-16 16:27:44 +0000
committerDavid Howells <dhowells@redhat.com>2017-03-16 16:27:44 +0000
commite8e581a88c5f5fc7cf1f636d122b77fbcfc8c2f6 (patch)
treef3a0da55163b43bbbc888c5638bb99e5cde1c301 /fs/afs/internal.h
parent3448e6521755862446aed28e29abf12565d8844e (diff)
downloadlinux-stable-e8e581a88c5f5fc7cf1f636d122b77fbcfc8c2f6.tar.gz
linux-stable-e8e581a88c5f5fc7cf1f636d122b77fbcfc8c2f6.tar.bz2
linux-stable-e8e581a88c5f5fc7cf1f636d122b77fbcfc8c2f6.zip
afs: Handle a short write to an AFS page
Handle the situation where afs_write_begin() is told to expect that a full-page write will be made, but this doesn't happen (EFAULT, CTRL-C, etc.), and so afs_write_end() sees a partial write took place. Currently, no attempt is to deal with the discrepency. Fix this by loading the gap from the server. Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r--fs/afs/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 7784a8bc375c..dc2cb486e127 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -130,7 +130,7 @@ struct afs_call_type {
*/
struct afs_read {
loff_t pos; /* Where to start reading */
- loff_t len; /* How much to read */
+ loff_t len; /* How much we're asking for */
loff_t actual_len; /* How much we're actually getting */
atomic_t usage;
unsigned int remain; /* Amount remaining */