afs: Handle a short write to an AFS page
authorDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:44 +0000 (16:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:44 +0000 (16:27 +0000)
commite8e581a88c5f5fc7cf1f636d122b77fbcfc8c2f6
treef3a0da55163b43bbbc888c5638bb99e5cde1c301
parent3448e6521755862446aed28e29abf12565d8844e
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>
fs/afs/fsclient.c
fs/afs/internal.h
fs/afs/write.c