@@ -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,
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@infradead.org> --- fs/ext4/inline.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)