android_kernel_oneplus_msm8998/fs/afs
David Howells 5e469e44c8 afs: Fix afs_kill_pages()
[ Upstream commit 7286a35e893176169b09715096a4aca557e2ccd2 ]

Fix afs_kill_pages() in two ways:

 (1) If a writeback has been partially flushed, then if we try and kill the
     pages it contains, some of them may no longer be undergoing writeback
     and end_page_writeback() will assert.

     Fix this by checking to see whether the page in question is actually
     undergoing writeback before ending that writeback.

 (2) The loop that scans for pages to kill doesn't increase the first page
     index, and so the loop may not terminate, but it will try to process
     the same pages over and over again.

     Fix this by increasing the first page index to one after the last page
     we processed.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:04:56 +01:00
..
afs.h afs: Support interacting with multiple user namespaces 2013-02-13 06:00:51 -08:00
afs_cm.h
afs_fs.h
afs_vl.h AFS: Fix silly characters in a comment 2011-07-20 20:48:03 -04:00
cache.c Fix common misspellings 2011-03-31 11:26:23 -03:00
callback.c afs: Migrate vlocation fields to 64-bit 2017-12-20 10:04:56 +01:00
cell.c FS-Cache: Provide the ability to enable/disable cookies 2013-09-27 18:40:25 +01:00
cmservice.c afs: Connect up the CB.ProbeUuid 2017-12-16 10:33:56 +01:00
dir.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
file.c afs: Flush outstanding writes when an fd is closed 2017-12-20 10:04:56 +01:00
flock.c locks: ensure that fl_owner is always initialized properly in flock and lease codepaths 2014-06-02 08:09:29 -04:00
fsclient.c afs: Populate and use client modification time 2017-12-20 10:04:56 +01:00
inode.c afs: Populate and use client modification time 2017-12-20 10:04:56 +01:00
internal.h afs: Prevent callback expiry timer overflow 2017-12-20 10:04:56 +01:00
Kconfig fs/afs: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:39:04 -08:00
main.c AFS: Correctly assemble the client UUID 2014-07-29 10:14:36 -07:00
Makefile FS-Cache: Make kAFS use FS-Cache 2009-04-03 16:42:41 +01:00
misc.c kafs: Add more "unified AFS" error codes 2015-04-01 21:36:15 +01:00
mntpt.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
netdevices.c afs: BUG to BUG_ON changes 2009-04-09 10:41:19 -07:00
proc.c afs: proc cells and rootcell are writeable 2014-02-01 10:59:39 -08:00
rxrpc.c net: Add a struct net parameter to sock_create_kern 2015-05-11 10:50:17 -04:00
security.c afs: Adjust mode bits processing 2017-12-20 10:04:56 +01:00
server.c afs: Migrate vlocation fields to 64-bit 2017-12-20 10:04:56 +01:00
super.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
vlclient.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vlocation.c afs: Migrate vlocation fields to 64-bit 2017-12-20 10:04:56 +01:00
vnode.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
volume.c fs: introduce f_op->mmap_capabilities for nommu mmap support 2015-01-20 14:02:58 -07:00
write.c afs: Fix afs_kill_pages() 2017-12-20 10:04:56 +01:00