diff options
author | Evgeniy Dushistov <dushistov@mail.ru> | 2006-02-03 06:04:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 11:32:04 -0500 |
commit | 09114eb8c53d2d3b2ff9523e011cb68b2e245dce (patch) | |
tree | c66d4590814072f91d74f185c798a3935d933209 /include | |
parent | e295cfcb2907ae4c5df57f5d4ada1ce6f3ae4657 (diff) |
[PATCH] ufs: fix hang during `rm'
This fixes the code like this:
bh = sb_find_get_block (sb, tmp + j);
if ((bh && DATA_BUFFER_USED(bh)) || tmp != fs32_to_cpu(sb, *p)) {
retry = 1;
brelse (bh);
goto next1;
}
bforget (bh);
sb_find_get_block() ordinarily returns a buffer_head with b_count>=2, and
this code assume that in case if "b_count>1" buffer is used, so this caused
infinite loop.
(akpm: that is-the-buffer-busy code is incomprehensible. Good riddance. Use
of block_truncate_page() seems sane).
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 'include')
-rw-r--r-- | include/linux/ufs_fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index f26118ea1c58..74aaf298b40d 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -912,6 +912,7 @@ extern int ufs_sync_inode (struct inode *); | |||
912 | extern void ufs_delete_inode (struct inode *); | 912 | extern void ufs_delete_inode (struct inode *); |
913 | extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); | 913 | extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); |
914 | extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); | 914 | extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); |
915 | extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); | ||
915 | 916 | ||
916 | /* namei.c */ | 917 | /* namei.c */ |
917 | extern struct file_operations ufs_dir_operations; | 918 | extern struct file_operations ufs_dir_operations; |