diff options
author | Miles Bader <miles@gnu.org> | 1995-04-22 02:11:36 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-04-22 02:11:36 +0000 |
commit | 9a23f2b8f6782f4d7612b1d2e1437463b8d8752e (patch) | |
tree | e46c1a9c6ffba6e6fd16ca34d45509f1403332e1 /ext2fs | |
parent | b347a0fb283a775fdc6efea6834020dcda986dce (diff) |
Formerly pager.c.~19~
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/pager.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext2fs/pager.c b/ext2fs/pager.c index c7e4204d..dea06fa7 100644 --- a/ext2fs/pager.c +++ b/ext2fs/pager.c @@ -2,6 +2,8 @@ Copyright (C) 1994, 1995 Free Software Foundation, Inc. + Converted for ext2fs by Miles Bader <miles@gnu.ai.mit.edu> + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at @@ -317,13 +319,20 @@ disk_pager_write_page (vm_offset_t page, vm_address_t buf) while (length > 0 && !err) { + int modified; daddr_t block = boffs_block (offs); - if (clear_bit (block, modified_global_blocks)) + + spin_lock (&modified_global_blocks_lock); + modified = clear_bit (block, modified_global_blocks); + spin_unlock (&modified_global_blocks_lock); + + if (modified) /* This block's been modified, so write it out. */ err = pending_blocks_add (&pb, block); else /* Otherwise just skip it. */ err = pending_blocks_skip (&pb); + offs += block_size; } |