Browse Source

ceph: remove stale check in ceph_invalidatepage()

Both set_page_dirty and truncate_complete_page should be called
for locked page, they can't race with each other.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Yan, Zheng 8 years ago
parent
commit
b072d77466
1 changed files with 1 additions and 8 deletions
  1. 1 8
      fs/ceph/addr.c

+ 1 - 8
fs/ceph/addr.c

@@ -152,17 +152,10 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,
 
 
 	ceph_invalidate_fscache_page(inode, page);
 	ceph_invalidate_fscache_page(inode, page);
 
 
+	WARN_ON(!PageLocked(page));
 	if (!PagePrivate(page))
 	if (!PagePrivate(page))
 		return;
 		return;
 
 
-	/*
-	 * We can get non-dirty pages here due to races between
-	 * set_page_dirty and truncate_complete_page; just spit out a
-	 * warning, in case we end up with accounting problems later.
-	 */
-	if (!PageDirty(page))
-		pr_err("%p invalidatepage %p page not dirty\n", inode, page);
-
 	ClearPageChecked(page);
 	ClearPageChecked(page);
 
 
 	dout("%p invalidatepage %p idx %lu full dirty page\n",
 	dout("%p invalidatepage %p idx %lu full dirty page\n",