summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2016-01-12 21:29:29 +0000
committerriastradh <riastradh@NetBSD.org>2016-01-12 21:29:29 +0000
commit44024e78840ad024f76f0ba0165def4e87b3bbae (patch)
treea94266936c5ebc55ad4c92dfe173dc4ee0cc5432
parent63eb84d1826507d131d83fa4f956e5b8a075c9e6 (diff)
Use buffer cache, not page cache, to expand directories in ext2fs.
Candidate fix for PR kern/50607, PR port-evbmips/50059. Formerly VOP_WRITE-->ext2fs_write would automatically dispatch to this code path for writes to directories, but I broke that in ext2fs_lookup.c rev. 1.78 when disentangling page-cached and buffer-cached writes. This was not a problem in ufs, and I didn't notice it in ext2fs, because ufs consistently used buffercache(9) directly instead of using VOP_WRITE sometimes as ext2fs did.
-rw-r--r--sys/ufs/ext2fs/ext2fs_lookup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c
index fc15c819950..7ea912f4119 100644
--- a/sys/ufs/ext2fs/ext2fs_lookup.c
+++ b/sys/ufs/ext2fs/ext2fs_lookup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_lookup.c,v 1.78 2015/03/27 17:27:56 riastradh Exp $ */
+/* $NetBSD: ext2fs_lookup.c,v 1.79 2016/01/12 21:29:29 riastradh Exp $ */
/*
* Modified for NetBSD 1.2E
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_lookup.c,v 1.78 2015/03/27 17:27:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_lookup.c,v 1.79 2016/01/12 21:29:29 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -768,7 +768,7 @@ ext2fs_direnter(struct inode *ip, struct vnode *dvp,
auio.uio_iovcnt = 1;
auio.uio_rw = UIO_WRITE;
UIO_SETUP_SYSSPACE(&auio);
- error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
+ error = ext2fs_bufwr(dvp, &auio, IO_SYNC, cnp->cn_cred);
if (dirblksiz > dvp->v_mount->mnt_stat.f_bsize)
/* XXX should grow with balloc() */
panic("ext2fs_direnter: frag size");