diff options
author | Miles Bader <miles@gnu.org> | 1995-05-08 13:32:51 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-05-08 13:32:51 +0000 |
commit | c1c18ac2c4841bc672b8506eea012f668750d273 (patch) | |
tree | c6cc89921f6d9bc03b9538fa00d9e87a6ee1bd26 /ufs | |
parent | 0d4c9552d7f837afa7b28a86363434da2d77ce7a (diff) |
(pager_clear_user_data): Don't die when called on the disk pager.
Diffstat (limited to 'ufs')
-rw-r--r-- | ufs/pager.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ufs/pager.c b/ufs/pager.c index f403df64..35bf1d22 100644 --- a/ufs/pager.c +++ b/ufs/pager.c @@ -358,16 +358,18 @@ pager_report_extent (struct user_pager_info *pager, void pager_clear_user_data (struct user_pager_info *upi) { - assert (upi->type == FILE_DATA); - spin_lock (&node2pagelock); - upi->np->dn->fileinfo = 0; - spin_unlock (&node2pagelock); - diskfs_nrele_light (upi->np); - spin_lock (&pagerlistlock); - *upi->prevp = upi->next; - if (upi->next) - upi->next->prevp = upi->prevp; - spin_unlock (&pagerlistlock); + if (upi->type == FILE_DATA) + { + spin_lock (&node2pagelock); + upi->np->dn->fileinfo = 0; + spin_unlock (&node2pagelock); + diskfs_nrele_light (upi->np); + spin_lock (&pagerlistlock); + *upi->prevp = upi->next; + if (upi->next) + upi->next->prevp = upi->prevp; + spin_unlock (&pagerlistlock); + } free (upi); } |