- I hit a BUG in end_swap_bio_read() under heavy load. The page
wasn't locked. No idea how this can happen :(
Add a BUG at submission time to catch a caller reading into an
unlocked swapcache page.
- Remove a debug check from destroy_inode() - it was in the wrong leg
of the `if' statement anyway.
if (inode_has_buffers(inode))
BUG();
security_ops->inode_free_security(inode);
- if (inode->i_sb->s_op->destroy_inode) {
+ if (inode->i_sb->s_op->destroy_inode)
inode->i_sb->s_op->destroy_inode(inode);
- } else {
- BUG_ON(inode->i_data.page_tree.rnode != NULL);
+ else
kmem_cache_free(inode_cachep, (inode));
- }
}
struct bio *bio;
int ret = 0;
+ BUG_ON(!PageLocked(page));
ClearPageUptodate(page);
bio = get_swap_bio(GFP_KERNEL, page, end_swap_bio_read);
if (bio == NULL) {