Merge remote-tracking branch 'linus/master' into testing
This commit is contained in:
@@ -143,7 +143,8 @@ static int ceph_set_page_dirty(struct page *page)
|
||||
* dirty page counters appropriately. Only called if there is private
|
||||
* data on the page.
|
||||
*/
|
||||
static void ceph_invalidatepage(struct page *page, unsigned long offset)
|
||||
static void ceph_invalidatepage(struct page *page, unsigned int offset,
|
||||
unsigned int length)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct ceph_inode_info *ci;
|
||||
@@ -159,20 +160,20 @@ static void ceph_invalidatepage(struct page *page, unsigned long offset)
|
||||
if (!PageDirty(page))
|
||||
pr_err("%p invalidatepage %p page not dirty\n", inode, page);
|
||||
|
||||
if (offset == 0)
|
||||
if (offset == 0 && length == PAGE_CACHE_SIZE)
|
||||
ClearPageChecked(page);
|
||||
|
||||
ci = ceph_inode(inode);
|
||||
if (offset == 0) {
|
||||
dout("%p invalidatepage %p idx %lu full dirty page %lu\n",
|
||||
inode, page, page->index, offset);
|
||||
if (offset == 0 && length == PAGE_CACHE_SIZE) {
|
||||
dout("%p invalidatepage %p idx %lu full dirty page\n",
|
||||
inode, page, page->index);
|
||||
ceph_put_wrbuffer_cap_refs(ci, 1, snapc);
|
||||
ceph_put_snap_context(snapc);
|
||||
page->private = 0;
|
||||
ClearPagePrivate(page);
|
||||
} else {
|
||||
dout("%p invalidatepage %p idx %lu partial dirty page\n",
|
||||
inode, page, page->index);
|
||||
dout("%p invalidatepage %p idx %lu partial dirty page %u(%u)\n",
|
||||
inode, page, page->index, offset, length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user