Skip to content

Commit

Permalink
exofs: readpage_strip: Add a BUG_ON to check for PageLocked(page)
Browse files Browse the repository at this point in the history
readpage_strip can be called from several code paths all of which
require that the page be locked before any operations are carried
out.

Since we export the exofs_readpage callback to the VFS, add a
BUG_ON to check for PageLocked(page) to make sure that this
understanding is never compromised.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Kautuk Consul authored and Boaz Harrosh committed Aug 2, 2012
1 parent c999ff6 commit 0e8d96d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ static int readpage_strip(void *data, struct page *page)
size_t len;
int ret;

BUG_ON(!PageLocked(page));

/* FIXME: Just for debugging, will be removed */
if (PageUptodate(page))
EXOFS_ERR("PageUptodate(0x%lx, 0x%lx)\n", pcol->inode->i_ino,
Expand Down

0 comments on commit 0e8d96d

Please sign in to comment.