mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs/ext4: use list_last_entry instead of list_entry
@ 2015-11-25 13:59 Geliang Tang
  0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2015-11-25 13:59 UTC (permalink / raw)
  To: Theodore Ts'o, Andreas Dilger; +Cc: Geliang Tang, linux-ext4, linux-kernel

To make the intention clearer, use list_last_entry instead of list_entry.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 fs/ext4/readpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
index 5dc5e95..ea97d5979 100644
--- a/fs/ext4/readpage.c
+++ b/fs/ext4/readpage.c
@@ -163,7 +163,7 @@ int ext4_mpage_readpages(struct address_space *mapping,
 
 		prefetchw(&page->flags);
 		if (pages) {
-			page = list_entry(pages->prev, struct page, lru);
+			page = list_last_entry(pages, struct page, lru);
 			list_del(&page->lru);
 			if (add_to_page_cache_lru(page, mapping, page->index,
 				  mapping_gfp_constraint(mapping, GFP_KERNEL)))
-- 
2.5.0



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-25 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 13:59 [PATCH] fs/ext4: use list_last_entry instead of list_entry Geliang Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®