]> git.hungrycats.org Git - linux/commitdiff
afs: Fix missing put_page()
authorDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:43 +0000 (16:27 +0000)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 17 Jan 2018 17:55:34 +0000 (12:55 -0500)
[ Upstream commit 29c8bbbd6e21daa0997d1c3ee886b897ee7ad652 ]

In afs_writepages_region(), inside the loop where we find dirty pages to
deal with, one of the if-statements is missing a put_page().

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
fs/afs/write.c

index 0714abcd7f32321754287e46aec129196832e2ef..777ea2bbf4015dfd792eff4568ad7760be6c2644 100644 (file)
@@ -503,6 +503,7 @@ static int afs_writepages_region(struct address_space *mapping,
 
                if (PageWriteback(page) || !PageDirty(page)) {
                        unlock_page(page);
+                       put_page(page);
                        continue;
                }