mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-18 04:34:36 +00:00
[GFS2] Fix ordering of page disposal vs. glock_dq
In case of unlinked files with dirty pages GFS2 wasn't clearing the pages in quite the right order. This patch clears the pages earlier (before the qlock_dq) to avoid the situation that the release of the glock results in attempting to write back data that has already been deallocated. This fixes Red Hat bugzilla: #220117 Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
parent
4edde74eed
commit
49686f7106
1 changed files with 6 additions and 0 deletions
|
@ -429,6 +429,12 @@ static void gfs2_delete_inode(struct inode *inode)
|
||||||
}
|
}
|
||||||
|
|
||||||
error = gfs2_dinode_dealloc(ip);
|
error = gfs2_dinode_dealloc(ip);
|
||||||
|
/*
|
||||||
|
* Must do this before unlock to avoid trying to write back
|
||||||
|
* potentially dirty data now that inode no longer exists
|
||||||
|
* on disk.
|
||||||
|
*/
|
||||||
|
truncate_inode_pages(&inode->i_data, 0);
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
gfs2_glock_dq(&ip->i_iopen_gh);
|
gfs2_glock_dq(&ip->i_iopen_gh);
|
||||||
|
|
Loading…
Add table
Reference in a new issue