[PATCH] ufs: ufs_trunc_indirect: infinite cycle
Currently, ufs write support have two sets of problems: work with files and work with directories. This series of patches should solve the first problem. This patch is similar to http://lkml.org/lkml/2006/1/17/61 this patch complements it. The situation the same: in ufs_trunc_(not direct), we read block, check if count of links to it is equal to one, if so we finish cycle, if not continue. Because of "count of links" always >=2 this operation cause infinite cycle and hang up the kernel. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
a9adb8dbcd
commit
2061df0f89
@@ -139,18 +139,6 @@ void ubh_wait_on_buffer (struct ufs_buffer_head * ubh)
|
||||
wait_on_buffer (ubh->bh[i]);
|
||||
}
|
||||
|
||||
unsigned ubh_max_bcount (struct ufs_buffer_head * ubh)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned max = 0;
|
||||
if (!ubh)
|
||||
return 0;
|
||||
for ( i = 0; i < ubh->count; i++ )
|
||||
if ( atomic_read(&ubh->bh[i]->b_count) > max )
|
||||
max = atomic_read(&ubh->bh[i]->b_count);
|
||||
return max;
|
||||
}
|
||||
|
||||
void ubh_bforget (struct ufs_buffer_head * ubh)
|
||||
{
|
||||
unsigned i;
|
||||
|
Reference in New Issue
Block a user