aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
authorKautuk Consul <consul.kautuk@gmail.com>2012-02-20 03:46:12 -0500
committerBoaz Harrosh <bharrosh@panasas.com>2012-08-02 07:52:12 -0400
commit0e8d96dd2c99405c707f540b5922ec869b848979 (patch)
tree4279e079a86060037f6f99c4a0fc1e20825269f9 /fs/exofs/inode.c
parentc999ff68029ebd0f56ccae75444f640f6d5a27d2 (diff)
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>
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r--fs/exofs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 5badb0c039de..9a5ed30b8a35 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -389,6 +389,8 @@ static int readpage_strip(void *data, struct page *page)
389 size_t len; 389 size_t len;
390 int ret; 390 int ret;
391 391
392 BUG_ON(!PageLocked(page));
393
392 /* FIXME: Just for debugging, will be removed */ 394 /* FIXME: Just for debugging, will be removed */
393 if (PageUptodate(page)) 395 if (PageUptodate(page))
394 EXOFS_ERR("PageUptodate(0x%lx, 0x%lx)\n", pcol->inode->i_ino, 396 EXOFS_ERR("PageUptodate(0x%lx, 0x%lx)\n", pcol->inode->i_ino,