summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-08-30 11:27:29 +0800
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:55 +0200
commitb072d774664b690768bdf7e068ee95a161e5f107 (patch)
tree98a0e3bc2f6b3465b9563422b179eeefc66d8d0d /fs/ceph
parent3ae0bebc49b3fb3c9fa9b62b95c5119a04aa7282 (diff)
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/addr.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index d82036e19083..b6ac3da9ddab 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -152,17 +152,10 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,
ceph_invalidate_fscache_page(inode, page);
+ WARN_ON(!PageLocked(page));
if (!PagePrivate(page))
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);
dout("%p invalidatepage %p idx %lu full dirty page\n",