diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-06 10:23:37 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-06 10:23:37 +0400 |
commit | e12fe68ce34d60c04bb1ddb1d3cc5c3022388fe4 (patch) | |
tree | 83c0e192ccaa4752c80b6131a7d0aa8272b5d0d0 /fs/inode.c | |
parent | 7329f0d58de01878d9ce4f0be7a76e136f223eef (diff) | |
parent | 712ae51afd55b20c04c5383d02ba5d10233313b1 (diff) | |
download | linux-e12fe68ce34d60c04bb1ddb1d3cc5c3022388fe4.tar.xz |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c index 0f7e88a7803f..43566d17d1b8 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -423,7 +423,14 @@ EXPORT_SYMBOL(remove_inode_hash); void end_writeback(struct inode *inode) { might_sleep(); + /* + * We have to cycle tree_lock here because reclaim can be still in the + * process of removing the last page (in __delete_from_page_cache()) + * and we must not free mapping under it. + */ + spin_lock_irq(&inode->i_data.tree_lock); BUG_ON(inode->i_data.nrpages); + spin_unlock_irq(&inode->i_data.tree_lock); BUG_ON(!list_empty(&inode->i_data.private_list)); BUG_ON(!(inode->i_state & I_FREEING)); BUG_ON(inode->i_state & I_CLEAR); |