From fa2b7bea2d3e774fa63aee529b9b54a54e36a610 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 25 Jun 2010 16:21:06 +1000 Subject: [PATCH] Relax loop count restriction in truncation. It is possible to hit the current count in normal operations, so make it a lot gentler. Signed-off-by: NeilBrown --- inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inode.c b/inode.c index 027f856..6c0f062 100644 --- a/inode.c +++ b/inode.c @@ -581,6 +581,7 @@ void lafs_inode_handle_orphan(struct datablock *b) struct fs *fs = fs_from_inode(ino); u32 trunc_next, next_trunc; int do_restart; + int loop_cnt = 20; restart: do_restart = 1; @@ -695,10 +696,9 @@ void lafs_inode_handle_orphan(struct datablock *b) lafs_iounlock_block(&ib2->b); if (!list_empty(&ib2->b.siblings)) { - static int cnt = 10; printk("looping on %s\n", strblk(&ib2->b)); - cnt--; - if (cnt < 0) + loop_cnt--; + if (loop_cnt < 0) BUG(); } putiref(ib2, MKREF(inode_handle_orphan2)); -- 2.39.5