aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/addr.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 3e68ac101040..38b5c1bc6776 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -143,7 +143,8 @@ static int ceph_set_page_dirty(struct page *page)
143 * dirty page counters appropriately. Only called if there is private 143 * dirty page counters appropriately. Only called if there is private
144 * data on the page. 144 * data on the page.
145 */ 145 */
146static void ceph_invalidatepage(struct page *page, unsigned long offset) 146static void ceph_invalidatepage(struct page *page, unsigned int offset,
147 unsigned int length)
147{ 148{
148 struct inode *inode; 149 struct inode *inode;
149 struct ceph_inode_info *ci; 150 struct ceph_inode_info *ci;
@@ -163,20 +164,20 @@ static void ceph_invalidatepage(struct page *page, unsigned long offset)
163 if (!PageDirty(page)) 164 if (!PageDirty(page))
164 pr_err("%p invalidatepage %p page not dirty\n", inode, page); 165 pr_err("%p invalidatepage %p page not dirty\n", inode, page);
165 166
166 if (offset == 0) 167 if (offset == 0 && length == PAGE_CACHE_SIZE)
167 ClearPageChecked(page); 168 ClearPageChecked(page);
168 169
169 ci = ceph_inode(inode); 170 ci = ceph_inode(inode);
170 if (offset == 0) { 171 if (offset == 0 && length == PAGE_CACHE_SIZE) {
171 dout("%p invalidatepage %p idx %lu full dirty page %lu\n", 172 dout("%p invalidatepage %p idx %lu full dirty page\n",
172 inode, page, page->index, offset); 173 inode, page, page->index);
173 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); 174 ceph_put_wrbuffer_cap_refs(ci, 1, snapc);
174 ceph_put_snap_context(snapc); 175 ceph_put_snap_context(snapc);
175 page->private = 0; 176 page->private = 0;
176 ClearPagePrivate(page); 177 ClearPagePrivate(page);
177 } else { 178 } else {
178 dout("%p invalidatepage %p idx %lu partial dirty page\n", 179 dout("%p invalidatepage %p idx %lu partial dirty page %u(%u)\n",
179 inode, page, page->index); 180 inode, page, page->index, offset, length);
180 } 181 }
181} 182}
182 183