linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: Do not check for PagePrivate twice
@ 2019-10-18 18:15 Goldwyn Rodrigues
  2019-10-18 18:15 ` [PATCH] btrfs: Do not check for writeback in btrfs_releasepage() Goldwyn Rodrigues
  2019-10-21  9:52 ` [PATCH] btrfs: Do not check for PagePrivate twice Filipe Manana
  0 siblings, 2 replies; 5+ messages in thread
From: Goldwyn Rodrigues @ 2019-10-18 18:15 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Goldwyn Rodrigues

From: Goldwyn Rodrigues <rgoldwyn@suse.com>

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

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-28 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 18:15 [PATCH] btrfs: Do not check for PagePrivate twice Goldwyn Rodrigues
2019-10-18 18:15 ` [PATCH] btrfs: Do not check for writeback in btrfs_releasepage() Goldwyn Rodrigues
2019-10-18 23:35   ` Goldwyn Rodrigues
2019-10-21  9:52 ` [PATCH] btrfs: Do not check for PagePrivate twice Filipe Manana
2019-11-28 11:44   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).