diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-05-24 04:33:36 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-05-24 04:33:36 +0000 |
commit | 4a7a3fe8c5220fa6fc02ef5c473e5fbccae9185f (patch) | |
tree | 44eb154698e40e0abf7766ecce0df4e1cff8d764 | |
parent | 0b9698c2cc95b71cab14c9fdac266e56929218b4 (diff) |
brelse() on failed bread()
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 232a8fc5f3e..17fda288d6b 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.55 2004/12/09 17:41:53 millert Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.56 2005/05/24 04:33:35 pedro Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. * @@ -4631,8 +4631,10 @@ flush_pagedep_deps(pvp, mp, diraddhdp) FREE_LOCK(&lk); if ((error = bread(ump->um_devvp, fsbtodb(ump->um_fs, ino_to_fsba(ump->um_fs, inum)), - (int)ump->um_fs->fs_bsize, NOCRED, &bp)) != 0) + (int)ump->um_fs->fs_bsize, NOCRED, &bp)) != 0) { + brelse(bp); break; + } if ((error = bwrite(bp)) != 0) break; ACQUIRE_LOCK(&lk); |