Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Try not to use f_data, use f_{vnode, socket, pipe, mqueue, k...
details: https://anonhg.NetBSD.org/src/rev/723616652002
branches: trunk
changeset: 332057:723616652002
user: matt <matt%NetBSD.org@localhost>
date: Fri Sep 05 09:26:16 2014 +0000
description:
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.
diffstat:
sys/fs/union/union_subr.c | 6 +++---
sys/miscfs/fdesc/fdesc_vnops.c | 10 +++++-----
sys/miscfs/procfs/procfs_vfsops.c | 6 +++---
sys/miscfs/procfs/procfs_vnops.c | 10 +++++-----
sys/netsmb/smb_dev.c | 6 +++---
5 files changed, 19 insertions(+), 19 deletions(-)
diffs (157 lines):
diff -r 97c61fb40293 -r 723616652002 sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Fri Sep 05 09:24:48 2014 +0000
+++ b/sys/fs/union/union_subr.c Fri Sep 05 09:26:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.66 2014/06/17 12:38:12 hannken Exp $ */
+/* $NetBSD: union_subr.c,v 1.67 2014/09/05 09:26:16 matt Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.66 2014/06/17 12:38:12 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.67 2014/09/05 09:26:16 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1195,7 +1195,7 @@
return (error);
}
VOP_UNLOCK(lvp);
- fp->f_data = lvp;
+ fp->f_vnode = lvp;
fp->f_offset = 0;
error = vn_close(vp, FREAD, fp->f_cred);
if (error)
diff -r 97c61fb40293 -r 723616652002 sys/miscfs/fdesc/fdesc_vnops.c
--- a/sys/miscfs/fdesc/fdesc_vnops.c Fri Sep 05 09:24:48 2014 +0000
+++ b/sys/miscfs/fdesc/fdesc_vnops.c Fri Sep 05 09:26:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdesc_vnops.c,v 1.123 2014/09/04 13:29:50 christos Exp $ */
+/* $NetBSD: fdesc_vnops.c,v 1.124 2014/09/05 09:26:16 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.123 2014/09/04 13:29:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.124 2014/09/05 09:26:16 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -344,9 +344,9 @@
switch (fp->f_type) {
case DTYPE_VNODE:
- vn_lock((struct vnode *) fp->f_data, LK_SHARED | LK_RETRY);
- error = VOP_GETATTR((struct vnode *) fp->f_data, vap, cred);
- VOP_UNLOCK((struct vnode *) fp->f_data);
+ vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
+ error = VOP_GETATTR(fp->f_vnode, vap, cred);
+ VOP_UNLOCK(fp->f_vnode);
if (error == 0 && vap->va_type == VDIR) {
/*
* directories can cause loops in the namespace,
diff -r 97c61fb40293 -r 723616652002 sys/miscfs/procfs/procfs_vfsops.c
--- a/sys/miscfs/procfs/procfs_vfsops.c Fri Sep 05 09:24:48 2014 +0000
+++ b/sys/miscfs/procfs/procfs_vfsops.c Fri Sep 05 09:26:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_vfsops.c,v 1.92 2014/07/27 16:47:26 hannken Exp $ */
+/* $NetBSD: procfs_vfsops.c,v 1.93 2014/09/05 09:26:16 matt Exp $ */
/*
* Copyright (c) 1993
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.92 2014/07/27 16:47:26 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.93 2014/09/05 09:26:16 matt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -339,7 +339,7 @@
pfs->pfs_mode = S_IRUSR|S_IWUSR;
switch (fp->f_type) {
case DTYPE_VNODE:
- vxp = fp->f_data;
+ vxp = fp->f_vnode;
/*
* We make symlinks for directories
diff -r 97c61fb40293 -r 723616652002 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c Fri Sep 05 09:24:48 2014 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c Fri Sep 05 09:26:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $ */
+/* $NetBSD: procfs_vnops.c,v 1.192 2014/09/05 09:26:16 matt Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.191 2014/07/27 16:47:26 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.192 2014/09/05 09:26:16 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -821,7 +821,7 @@
switch (fp->f_type) {
case DTYPE_VNODE:
vap->va_bytes = vap->va_size =
- ((struct vnode *)fp->f_data)->v_size;
+ fp->f_vnode->v_size;
break;
default:
vap->va_bytes = vap->va_size = 0;
@@ -1146,7 +1146,7 @@
procfs_proc_unlock(p);
return ENOENT;
}
- fvp = fp->f_data;
+ fvp = fp->f_vnode;
/* Don't show directories */
if (fp->f_type == DTYPE_VNODE && fvp->v_type != VDIR) {
@@ -1648,7 +1648,7 @@
switch (fp->f_type) {
case DTYPE_VNODE:
- vxp = (struct vnode *)fp->f_data;
+ vxp = fp->f_vnode;
if (vxp->v_type != VDIR) {
error = EINVAL;
break;
diff -r 97c61fb40293 -r 723616652002 sys/netsmb/smb_dev.c
--- a/sys/netsmb/smb_dev.c Fri Sep 05 09:24:48 2014 +0000
+++ b/sys/netsmb/smb_dev.c Fri Sep 05 09:26:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_dev.c,v 1.42 2014/07/25 08:10:40 dholland Exp $ */
+/* $NetBSD: smb_dev.c,v 1.43 2014/09/05 09:26:16 matt Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.42 2014/07/25 08:10:40 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_dev.c,v 1.43 2014/09/05 09:26:16 matt Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -417,7 +417,7 @@
if ((fp = fd_getfile(fd)) == NULL)
return (EBADF);
- vp = fp->f_data;
+ vp = fp->f_vnode;
if (fp->f_type != DTYPE_VNODE
|| (fp->f_flag & (FREAD|FWRITE)) == 0
|| vp->v_type != VCHR
- Prev by Date:
[src/trunk]: src/sys/uvm Use f_vnode instead of f_data
- Next by Date:
[src/trunk]: src/sys Try not to use f_data, use f_{vnode, socket, pipe, mqueue, k...
- Previous by Thread:
[src/trunk]: src/sys/uvm Use f_vnode instead of f_data
- Next by Thread:
[src/trunk]: src/sys Try not to use f_data, use f_{vnode, socket, pipe, mqueue, k...
- Indexes:
Home |
Main Index |
Thread Index |
Old Index