From b39d4d2060fe9bb0a82dece69f8a3d01274b4577 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 9 Mar 2000 18:54:59 +0000 Subject: [PATCH] In the 'found' case for ufs_lookup() the underlying bp's data was being accessed after the bp had been releaed. A simple move of the brelse() solves the problem. Approved by: jkh Submitted by: Ian Dowse --- sys/ufs/ufs/ufs_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 7a0232d83f0..a5be8e77a66 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -313,7 +313,6 @@ searchloop: } dp->i_ino = ep->d_ino; dp->i_reclen = ep->d_reclen; - brelse(bp); goto found; } } @@ -417,6 +416,7 @@ found: dp->i_size = entryoffsetinblock + DIRSIZ(OFSFMT(vdp), ep); dp->i_flag |= IN_CHANGE | IN_UPDATE; } + brelse(bp); /* * Found component in pathname.