Skip to content

Commit b072d77

Browse files
ukernelidryomov
authored andcommitted
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" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 3ae0beb commit b072d77

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

fs/ceph/addr.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,10 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,
152152

153153
ceph_invalidate_fscache_page(inode, page);
154154

155+
WARN_ON(!PageLocked(page));
155156
if (!PagePrivate(page))
156157
return;
157158

158-
/*
159-
* We can get non-dirty pages here due to races between
160-
* set_page_dirty and truncate_complete_page; just spit out a
161-
* warning, in case we end up with accounting problems later.
162-
*/
163-
if (!PageDirty(page))
164-
pr_err("%p invalidatepage %p page not dirty\n", inode, page);
165-
166159
ClearPageChecked(page);
167160

168161
dout("%p invalidatepage %p idx %lu full dirty page\n",

0 commit comments

Comments
 (0)