diff options
author | Evgeniy Dushistov <dushistov@mail.ru> | 2006-06-25 08:47:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:01 -0400 |
commit | 2061df0f89201c0abeb4c17d343309c9fae5b861 (patch) | |
tree | a641b77e6197e6416dc043452db347dbfbb4bd3e /fs/ufs/util.c | |
parent | a9adb8dbcd7a337620862106f8c17aeb5e7278c7 (diff) |
[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>
Diffstat (limited to 'fs/ufs/util.c')
-rw-r--r-- | fs/ufs/util.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/ufs/util.c b/fs/ufs/util.c index 59acc8f073ac..72f91cc84bfe 100644 --- a/fs/ufs/util.c +++ b/fs/ufs/util.c | |||
@@ -139,18 +139,6 @@ void ubh_wait_on_buffer (struct ufs_buffer_head * ubh) | |||
139 | wait_on_buffer (ubh->bh[i]); | 139 | wait_on_buffer (ubh->bh[i]); |
140 | } | 140 | } |
141 | 141 | ||
142 | unsigned ubh_max_bcount (struct ufs_buffer_head * ubh) | ||
143 | { | ||
144 | unsigned i; | ||
145 | unsigned max = 0; | ||
146 | if (!ubh) | ||
147 | return 0; | ||
148 | for ( i = 0; i < ubh->count; i++ ) | ||
149 | if ( atomic_read(&ubh->bh[i]->b_count) > max ) | ||
150 | max = atomic_read(&ubh->bh[i]->b_count); | ||
151 | return max; | ||
152 | } | ||
153 | |||
154 | void ubh_bforget (struct ufs_buffer_head * ubh) | 142 | void ubh_bforget (struct ufs_buffer_head * ubh) |
155 | { | 143 | { |
156 | unsigned i; | 144 | unsigned i; |