2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00

exofs: readpage_strip: Add a BUG_ON to check for PageLocked(page)

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>
This commit is contained in:
Kautuk Consul 2012-02-20 03:46:12 -05:00 committed by Boaz Harrosh
parent c999ff6802
commit 0e8d96dd2c

View File

@ -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,