]> git.baikalelectronics.ru Git - kernel.git/commitdiff
afs: Unlock pages for __pagevec_release()
authorMarc Dionne <marc.dionne@auristor.com>
Sat, 13 Apr 2019 07:37:37 +0000 (08:37 +0100)
committerDavid Howells <dhowells@redhat.com>
Sat, 13 Apr 2019 07:37:37 +0000 (08:37 +0100)
__pagevec_release() complains loudly if any page in the vector is still
locked.  The pages need to be locked for generic_error_remove_page(), but
that function doesn't actually unlock them.

Unlock the pages afterwards.

Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Jonathan Billings <jsbillin@umich.edu>
fs/afs/write.c

index 72efcfcf9f95efd2b5cae1257a8d01247367ebeb..0122d7445fba1e07eaf62b4be1d1e69c66e5f7c4 100644 (file)
@@ -264,6 +264,7 @@ static void afs_kill_pages(struct address_space *mapping,
                                first = page->index + 1;
                        lock_page(page);
                        generic_error_remove_page(mapping, page);
+                       unlock_page(page);
                }
 
                __pagevec_release(&pv);