mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[PATCH] reiserfs: fix transaction overflowing
This patch fixes a bug in reiserfs truncate. A transaction might overflow when truncating long highly fragmented file. The fix is to split truncation into several transactions to avoid overflowing. Signed-off-by: Vladimir V. Saveliev <[email protected]> Cc; Charles McColgan <[email protected]> Cc: Alexander Zarochentsev <[email protected]> Cc: Hans Reiser <[email protected]> Cc: Chris Mason <[email protected]> Cc: Jeff Mahoney <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
bdfc326614
commit
23f9e0f891
2 changed files with 77 additions and 138 deletions
|
|
@ -1704,6 +1704,11 @@ static inline int reiserfs_transaction_running(struct super_block *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int reiserfs_transaction_free_space(struct reiserfs_transaction_handle *th)
|
||||
{
|
||||
return th->t_blocks_allocated - th->t_blocks_logged;
|
||||
}
|
||||
|
||||
int reiserfs_async_progress_wait(struct super_block *s);
|
||||
|
||||
struct reiserfs_transaction_handle *reiserfs_persistent_transaction(struct
|
||||
|
|
|
|||
Loading…
Reference in a new issue