From: Goldwyn Rodrigues <rgold...@suse.com>

We are checking PagePrivate twice, once with lock and once without.
Perform the check only once.

Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
---
 fs/btrfs/extent_io.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index cceaf05aada2..425ba359178c 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3959,9 +3959,6 @@ int btree_write_cache_pages(struct address_space *mapping,
                for (i = 0; i < nr_pages; i++) {
                        struct page *page = pvec.pages[i];
 
-                       if (!PagePrivate(page))
-                               continue;
-
                        spin_lock(&mapping->private_lock);
                        if (!PagePrivate(page)) {
                                spin_unlock(&mapping->private_lock);
-- 
2.16.4

Reply via email to