Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45898
b: refs/heads/master
c: 87df724
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jan 30, 2007
1 parent 1c612d9 commit bcc81c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 4cbf2aa35e1c189db234190fefc6c83b139ef963
refs/heads/master: 87df7241bd547da5d4d4a4e5397866dfe422e439
6 changes: 5 additions & 1 deletion trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,6 @@ int try_to_free_buffers(struct page *page)

spin_lock(&mapping->private_lock);
ret = drop_buffers(page, &buffers_to_free);
spin_unlock(&mapping->private_lock);

/*
* If the filesystem writes its buffers by hand (eg ext3)
Expand All @@ -2855,9 +2854,14 @@ int try_to_free_buffers(struct page *page)
* Also, during truncate, discard_buffer will have marked all
* the page's buffers clean. We discover that here and clean
* the page also.
*
* private_lock must be held over this entire operation in order
* to synchronise against __set_page_dirty_buffers and prevent the
* dirty bit from being lost.
*/
if (ret)
cancel_dirty_page(page, PAGE_CACHE_SIZE);
spin_unlock(&mapping->private_lock);
out:
if (buffers_to_free) {
struct buffer_head *bh = buffers_to_free;
Expand Down

0 comments on commit bcc81c1

Please sign in to comment.