Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/vnode.h
Show First 20 Lines • Show All 730 Lines • ▼ Show 20 Lines | int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, | ||||
struct ucred *active_cred, struct ucred *file_cred, ssize_t *aresid, | struct ucred *active_cred, struct ucred *file_cred, ssize_t *aresid, | ||||
struct thread *td); | struct thread *td); | ||||
int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, | int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base, | ||||
size_t len, off_t offset, enum uio_seg segflg, int ioflg, | size_t len, off_t offset, enum uio_seg segflg, int ioflg, | ||||
struct ucred *active_cred, struct ucred *file_cred, size_t *aresid, | struct ucred *active_cred, struct ucred *file_cred, size_t *aresid, | ||||
struct thread *td); | struct thread *td); | ||||
int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, | int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, | ||||
struct thread *td); | struct thread *td); | ||||
int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred, | |||||
struct ucred *file_cred, struct thread *td); | |||||
int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); | int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); | ||||
int vn_start_secondary_write(struct vnode *vp, struct mount **mpp, | int vn_start_secondary_write(struct vnode *vp, struct mount **mpp, | ||||
int flags); | int flags); | ||||
int vn_truncate_locked(struct vnode *vp, off_t length, bool sync, | int vn_truncate_locked(struct vnode *vp, off_t length, bool sync, | ||||
struct ucred *cred); | struct ucred *cred); | ||||
int vn_writechk(struct vnode *vp); | int vn_writechk(struct vnode *vp); | ||||
int vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace, | int vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace, | ||||
const char *attrname, int *buflen, char *buf, struct thread *td); | const char *attrname, int *buflen, char *buf, struct thread *td); | ||||
▲ Show 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | |||||
#define vop_lock_debugpre(x) do { } while (0) | #define vop_lock_debugpre(x) do { } while (0) | ||||
#define vop_lock_debugpost(x, y) do { } while (0) | #define vop_lock_debugpost(x, y) do { } while (0) | ||||
#define vop_unlock_debugpre(x) do { } while (0) | #define vop_unlock_debugpre(x) do { } while (0) | ||||
#define vop_need_inactive_debugpre(x) do { } while (0) | #define vop_need_inactive_debugpre(x) do { } while (0) | ||||
#define vop_need_inactive_debugpost(x, y) do { } while (0) | #define vop_need_inactive_debugpost(x, y) do { } while (0) | ||||
#endif | #endif | ||||
void vop_rename_fail(struct vop_rename_args *ap); | void vop_rename_fail(struct vop_rename_args *ap); | ||||
#define vop_stat_helper_pre(ap) ({ \ | |||||
kib: Why not make them inline functions ? | |||||
mjgAuthorUnsubmitted Done Inline Actionsaudit and mac add to header mess mjg: audit and mac add to header mess | |||||
int _error; \ | |||||
AUDIT_ARG_VNODE1(ap->a_vp); \ | |||||
_error = mac_vnode_check_stat(ap->a_active_cred, ap->a_file_cred, ap->a_vp);\ | |||||
if (__predict_true(_error == 0)) \ | |||||
bzero(ap->a_sb, sizeof(*ap->a_sb)); \ | |||||
_error; \ | |||||
}) | |||||
#define vop_stat_helper_post(ap) ({ \ | |||||
if (priv_check_cred_vfs_generation(ap->a_td->td_ucred)) \ | |||||
ap->a_sb->st_gen = 0; \ | |||||
}) | |||||
#define VOP_WRITE_PRE(ap) \ | #define VOP_WRITE_PRE(ap) \ | ||||
struct vattr va; \ | struct vattr va; \ | ||||
int error; \ | int error; \ | ||||
off_t osize, ooffset, noffset; \ | off_t osize, ooffset, noffset; \ | ||||
\ | \ | ||||
osize = ooffset = noffset = 0; \ | osize = ooffset = noffset = 0; \ | ||||
if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \ | if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \ | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |
Why not make them inline functions ?