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 | e06111c17de78853d266ec48860e7db1dfbd701a (patch) | |
tree | 74f1035708028421f119c7ee558e4021519a87e9 /ufs | |
parent | 4c51401dcc09332dae33bc0de3dd9fb7c14627f1 (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); } |