Module Name: src Committed By: hannken Date: Tue Dec 27 10:54:38 UTC 2016
Modified Files: src/sys/ufs/ffs: ffs_vfsops.c Log Message: Fix a bug introduced with Rev. 1.294: use LK_NOWAIT when called with MNT_LAZY. To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/sys/ufs/ffs/ffs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.341 src/sys/ufs/ffs/ffs_vfsops.c:1.342 --- src/sys/ufs/ffs/ffs_vfsops.c:1.341 Thu Oct 20 19:31:32 2016 +++ src/sys/ufs/ffs/ffs_vfsops.c Tue Dec 27 10:54:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.341 2016/10/20 19:31:32 jdolecek Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.342 2016/12/27 10:54:38 hannken Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.341 2016/10/20 19:31:32 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.342 2016/12/27 10:54:38 hannken Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -1917,7 +1917,8 @@ ffs_sync(struct mount *mp, int waitfor, ctx.is_suspending = is_suspending; while ((vp = vfs_vnode_iterator_next(marker, ffs_sync_selector, &ctx))) { - error = vn_lock(vp, LK_EXCLUSIVE); + error = vn_lock(vp, + LK_EXCLUSIVE | (waitfor == MNT_LAZY ? LK_NOWAIT : 0)); if (error) { vrele(vp); continue;