zfs: move a utility function, ioflags, closer to its consumers
No functional change. MFC after: 1 week
This commit is contained in:
parent
e676dae295
commit
0e29bd7dee
@ -4513,21 +4513,6 @@ zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr,
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
ioflags(int ioflags)
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
if (ioflags & IO_APPEND)
|
||||
flags |= FAPPEND;
|
||||
if (ioflags & IO_NDELAY)
|
||||
flags |= FNONBLOCK;
|
||||
if (ioflags & IO_SYNC)
|
||||
flags |= (FSYNC | FDSYNC | FRSYNC);
|
||||
|
||||
return (flags);
|
||||
}
|
||||
|
||||
static int
|
||||
zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int *rbehind,
|
||||
int *rahead)
|
||||
@ -4850,6 +4835,21 @@ zfs_freebsd_ioctl(ap)
|
||||
ap->a_fflag, ap->a_cred, NULL, NULL));
|
||||
}
|
||||
|
||||
static int
|
||||
ioflags(int ioflags)
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
if (ioflags & IO_APPEND)
|
||||
flags |= FAPPEND;
|
||||
if (ioflags & IO_NDELAY)
|
||||
flags |= FNONBLOCK;
|
||||
if (ioflags & IO_SYNC)
|
||||
flags |= (FSYNC | FDSYNC | FRSYNC);
|
||||
|
||||
return (flags);
|
||||
}
|
||||
|
||||
static int
|
||||
zfs_freebsd_read(ap)
|
||||
struct vop_read_args /* {
|
||||
|
Loading…
x
Reference in New Issue
Block a user