Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144469114
D26346.id77078.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D26346.id77078.diff
View Options
Index: head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_file_os.c
===================================================================
--- head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_file_os.c
+++ head/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_file_os.c
@@ -239,7 +239,7 @@
if (fp->f_type != DTYPE_VNODE)
return (EINVAL);
- v = fp->f_data;
+ v = fp->f_vnode;
return (zfs_vop_fsync(v));
}
Index: head/sys/fs/nfs/nfsdport.h
===================================================================
--- head/sys/fs/nfs/nfsdport.h
+++ head/sys/fs/nfs/nfsdport.h
@@ -94,7 +94,7 @@
#define NFSLOCKHASH(f) \
(&nfslockhash[nfsrv_hashfh(f) % nfsrv_lockhashsize])
-#define NFSFPVNODE(f) ((struct vnode *)((f)->f_data))
+#define NFSFPVNODE(f) ((f)->f_vnode)
#define NFSFPCRED(f) ((f)->f_cred)
#define NFSFPFLAG(f) ((f)->f_flag)
Index: head/sys/kern/kern_descrip.c
===================================================================
--- head/sys/kern/kern_descrip.c
+++ head/sys/kern/kern_descrip.c
@@ -2622,6 +2622,15 @@
atomic_store_rel_ptr((volatile uintptr_t *)&fp->f_ops, (uintptr_t)ops);
}
+void
+finit_vnode(struct file *fp, u_int flag, void *data, struct fileops *ops)
+{
+ fp->f_seqcount[UIO_READ] = 1;
+ fp->f_seqcount[UIO_WRITE] = 1;
+ finit(fp, (flag & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE,
+ data, ops);
+}
+
int
fget_cap_locked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp,
struct file **fpp, struct filecaps *havecapsp)
Index: head/sys/kern/vfs_syscalls.c
===================================================================
--- head/sys/kern/vfs_syscalls.c
+++ head/sys/kern/vfs_syscalls.c
@@ -1163,10 +1163,7 @@
*/
if (fp->f_ops == &badfileops) {
KASSERT(vp->v_type != VFIFO, ("Unexpected fifo."));
- fp->f_seqcount[UIO_READ] = 1;
- fp->f_seqcount[UIO_WRITE] = 1;
- finit(fp, (flags & FMASK) | (fp->f_flag & FHASLOCK),
- DTYPE_VNODE, vp, &vnops);
+ finit_vnode(fp, flags, NULL, &vnops);
}
VOP_UNLOCK(vp);
@@ -4138,7 +4135,6 @@
vp = vp->v_mount->mnt_vnodecovered;
VREF(vp);
fp->f_vnode = vp;
- fp->f_data = vp;
foffset = 0;
vput(tvp);
goto unionread;
@@ -4502,10 +4498,7 @@
td->td_dupfd = 0;
#endif
fp->f_vnode = vp;
- fp->f_seqcount[UIO_READ] = 1;
- fp->f_seqcount[UIO_WRITE] = 1;
- finit(fp, (fmode & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp,
- &vnops);
+ finit_vnode(fp, fmode, NULL, &vnops);
VOP_UNLOCK(vp);
if ((fmode & O_TRUNC) != 0) {
error = fo_truncate(fp, 0, td->td_ucred, td);
Index: head/sys/sys/file.h
===================================================================
--- head/sys/sys/file.h
+++ head/sys/sys/file.h
@@ -268,6 +268,7 @@
int vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif);
void finit(struct file *, u_int, short, void *, struct fileops *);
+void finit_vnode(struct file *, u_int, void *, struct fileops *);
int fgetvp(struct thread *td, int fd, cap_rights_t *rightsp,
struct vnode **vpp);
int fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp,
Index: head/sys/ufs/ffs/ffs_alloc.c
===================================================================
--- head/sys/ufs/ffs/ffs_alloc.c
+++ head/sys/ufs/ffs/ffs_alloc.c
@@ -3220,7 +3220,7 @@
if ((error = getvnode(td, cmd.handle,
cap_rights_init(&rights, CAP_FSCK), &fp)) != 0)
return (error);
- vp = fp->f_data;
+ vp = fp->f_vnode;
if (vp->v_type != VREG && vp->v_type != VDIR) {
fdrop(fp, td);
return (EINVAL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 2:43 PM (19 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28590721
Default Alt Text
D26346.id77078.diff (3 KB)
Attached To
Mode
D26346: Add tmpfs page cache read support.
Attached
Detach File
Event Timeline
Log In to Comment