summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2007-04-10 09:28:17 +0000
committerkib <kib@FreeBSD.org>2007-04-10 09:28:17 +0000
commit61f6e27c6233361ae5133ec1cd6e06406bf5ac42 (patch)
tree523dfd483ed9456fbf5d23f8edcaee564294c860
parentbcc8cf69fe9b698355c0d954b213183e00d785f5 (diff)
downloadFreeBSD-src-61f6e27c6233361ae5133ec1cd6e06406bf5ac42.zip
FreeBSD-src-61f6e27c6233361ae5133ec1cd6e06406bf5ac42.tar.gz
When LK_NOWAIT is passed as argument to process_worklist_item(), this
does not prevent handle_workitem_remove() from recursing into a blocking version. Add the dirrem to worklist instead of processing it now if this is the case. Reported and tested by: kris Submitted by: tegge MFC after: 2 weeks
-rw-r--r--sys/ufs/ffs/ffs_softdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 482deb8..49c522c 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -3626,9 +3626,12 @@ handle_workitem_remove(dirrem, xp)
dirrem->dm_oldinum = dirrem->dm_dirinum;
if (inodedep_lookup(dirrem->dm_list.wk_mp, oldinum,
0, &inodedep) == 0 || check_inode_unwritten(inodedep)) {
+ if (xp != NULL)
+ add_to_worklist(&dirrem->dm_list);
FREE_LOCK(&lk);
vput(vp);
- handle_workitem_remove(dirrem, NULL);
+ if (xp == NULL)
+ handle_workitem_remove(dirrem, NULL);
return;
}
WORKLIST_INSERT(&inodedep->id_inowait, &dirrem->dm_list);
OpenPOWER on IntegriCloud