[PATCH v3 11/18] ext4: Tell the VFS that readpage was synchronous

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ext4 inline data readpage implementation was already synchronous,
so use AOP_UPDATED_PAGE to avoid cycling the page lock.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
 fs/ext4/inline.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 75c97bca0815..2a489243e4de 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -490,7 +490,8 @@ static int ext4_read_inline_page(struct inode *inode, struct page *page)
 	zero_user_segment(page, len, PAGE_SIZE);
 	SetPageUptodate(page);
 	brelse(iloc.bh);
-
+	if (ret >= 0)
+		return AOP_UPDATED_PAGE;
 out:
 	return ret;
 }
@@ -514,12 +515,14 @@ int ext4_readpage_inline(struct inode *inode, struct page *page)
 	else if (!PageUptodate(page)) {
 		zero_user_segment(page, 0, PAGE_SIZE);
 		SetPageUptodate(page);
+		ret = AOP_UPDATED_PAGE;
 	}
 
 	up_read(&EXT4_I(inode)->xattr_sem);
 
-	unlock_page(page);
-	return ret >= 0 ? 0 : ret;
+	if (ret < 0)
+		unlock_page(page);
+	return ret;
 }
 
 static int ext4_convert_inline_data_to_extent(struct address_space *mapping,
-- 
2.28.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux