Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/msdosfs Lock vnode for vinvalbuf().
details: https://anonhg.NetBSD.org/src/rev/6e6b40ad3ef0
branches: trunk
changeset: 365240:6e6b40ad3ef0
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Apr 16 07:58:21 2022 +0000
description:
Lock vnode for vinvalbuf().
diffstat:
sys/fs/msdosfs/msdosfs_vfsops.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 9fb38e5fd47f -r 6e6b40ad3ef0 sys/fs/msdosfs/msdosfs_vfsops.c
--- a/sys/fs/msdosfs/msdosfs_vfsops.c Sat Apr 16 07:56:45 2022 +0000
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c Sat Apr 16 07:58:21 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vfsops.c,v 1.137 2021/10/23 16:58:17 thorpej Exp $ */
+/* $NetBSD: msdosfs_vfsops.c,v 1.138 2022/04/16 07:58:21 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.137 2021/10/23 16:58:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.138 2022/04/16 07:58:21 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -472,7 +472,10 @@
u_long fatbytes, fatblocksecs;
/* Flush out any old buffers remaining from a previous use. */
- if ((error = vinvalbuf(devvp, V_SAVE, l->l_cred, l, 0, 0)) != 0)
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
+ error = vinvalbuf(devvp, V_SAVE, l->l_cred, l, 0, 0);
+ VOP_UNLOCK(devvp);
+ if (error)
return (error);
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
Home |
Main Index |
Thread Index |
Old Index