diff options
author | kib <kib@FreeBSD.org> | 2007-04-10 09:28:17 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2007-04-10 09:28:17 +0000 |
commit | 61f6e27c6233361ae5133ec1cd6e06406bf5ac42 (patch) | |
tree | 523dfd483ed9456fbf5d23f8edcaee564294c860 /sys/ufs | |
parent | bcc8cf69fe9b698355c0d954b213183e00d785f5 (diff) | |
download | FreeBSD-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
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 5 |
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); |