aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2013-05-21 23:58:48 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-05-21 23:58:48 -0400
commit569d39fc3e1dd9d23ad44f5e7e51ccf69d368720 (patch)
tree9472e48380bb007249d91235d55eebaace72a0dd /fs/ceph/addr.c
parente5f8d30d6827633c9ac084143cbf8fffc1844da5 (diff)
ceph: use ->invalidatepage() length argument
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ceph_invalidatepage(). Signed-off-by: Lukas Czerner <lczerner@redhat.com> Acked-by: Sage Weil <sage@inktank.com> Cc: ceph-devel@vger.kernel.org
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index b1899400df1f..38b5c1bc6776 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -164,20 +164,20 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,
164 if (!PageDirty(page)) 164 if (!PageDirty(page))
165 pr_err("%p invalidatepage %p page not dirty\n", inode, page); 165 pr_err("%p invalidatepage %p page not dirty\n", inode, page);
166 166
167 if (offset == 0) 167 if (offset == 0 && length == PAGE_CACHE_SIZE)
168 ClearPageChecked(page); 168 ClearPageChecked(page);
169 169
170 ci = ceph_inode(inode); 170 ci = ceph_inode(inode);
171 if (offset == 0) { 171 if (offset == 0 && length == PAGE_CACHE_SIZE) {
172 dout("%p invalidatepage %p idx %lu full dirty page %u\n", 172 dout("%p invalidatepage %p idx %lu full dirty page\n",
173 inode, page, page->index, offset); 173 inode, page, page->index);
174 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); 174 ceph_put_wrbuffer_cap_refs(ci, 1, snapc);
175 ceph_put_snap_context(snapc); 175 ceph_put_snap_context(snapc);
176 page->private = 0; 176 page->private = 0;
177 ClearPagePrivate(page); 177 ClearPagePrivate(page);
178 } else { 178 } else {
179 dout("%p invalidatepage %p idx %lu partial dirty page\n", 179 dout("%p invalidatepage %p idx %lu partial dirty page %u(%u)\n",
180 inode, page, page->index); 180 inode, page, page->index, offset, length);
181 } 181 }
182} 182}
183 183