Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2981
b: refs/heads/master
c: 152becd
h: refs/heads/master
i:
  2979: 52a82c7
v: v3
  • Loading branch information
Anton Altaparmakov authored and Linus Torvalds committed Jun 23, 2005
1 parent ee902fb commit 5fd04ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a59f452abe11f569e13ec16c51e6d61c54b9838
refs/heads/master: 152becd26e0563aefdbc4fd1fe491928efe92d1f
12 changes: 8 additions & 4 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1926,7 +1926,6 @@ static int __block_prepare_write(struct inode *inode, struct page *page,
if (err)
break;
if (buffer_new(bh)) {
clear_buffer_new(bh);
unmap_underlying_metadata(bh->b_bdev,
bh->b_blocknr);
if (PageUptodate(page)) {
Expand Down Expand Up @@ -1968,9 +1967,14 @@ static int __block_prepare_write(struct inode *inode, struct page *page,
if (!buffer_uptodate(*wait_bh))
err = -EIO;
}
if (!err)
return err;

if (!err) {
bh = head;
do {
if (buffer_new(bh))
clear_buffer_new(bh);
} while ((bh = bh->b_this_page) != head);
return 0;
}
/* Error case: */
/*
* Zero out any newly allocated blocks to avoid exposing stale
Expand Down

0 comments on commit 5fd04ae

Please sign in to comment.