Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/ext2fs/ext2_vnops.c
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
#include "opt_suiddir.h" | #include "opt_suiddir.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/fcntl.h> | #include <sys/fcntl.h> | ||||
#include <sys/filio.h> | #include <sys/filio.h> | ||||
#include <sys/sdt.h> | |||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include <sys/bio.h> | #include <sys/bio.h> | ||||
#include <sys/buf.h> | #include <sys/buf.h> | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#include <sys/priv.h> | #include <sys/priv.h> | ||||
#include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
#include <sys/mount.h> | #include <sys/mount.h> | ||||
#include <sys/unistd.h> | #include <sys/unistd.h> | ||||
Show All 25 Lines | |||||
#include <fs/ext2fs/ext2fs.h> | #include <fs/ext2fs/ext2fs.h> | ||||
#include <fs/ext2fs/ext2_extern.h> | #include <fs/ext2fs/ext2_extern.h> | ||||
#include <fs/ext2fs/ext2_dinode.h> | #include <fs/ext2fs/ext2_dinode.h> | ||||
#include <fs/ext2fs/ext2_dir.h> | #include <fs/ext2fs/ext2_dir.h> | ||||
#include <fs/ext2fs/ext2_mount.h> | #include <fs/ext2fs/ext2_mount.h> | ||||
#include <fs/ext2fs/ext2_extattr.h> | #include <fs/ext2fs/ext2_extattr.h> | ||||
#include <fs/ext2fs/ext2_extents.h> | #include <fs/ext2fs/ext2_extents.h> | ||||
SDT_PROVIDER_DECLARE(ext2fs); | |||||
/* | |||||
* ext2fs trace probe: | |||||
* arg0: verbosity. Higher numbers give more verbose messages | |||||
* arg1: Textual message | |||||
*/ | |||||
SDT_PROBE_DEFINE2(ext2fs, , vnops, trace, "int", "char*"); | |||||
static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *); | static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *); | ||||
static void ext2_itimes_locked(struct vnode *); | static void ext2_itimes_locked(struct vnode *); | ||||
static vop_access_t ext2_access; | static vop_access_t ext2_access; | ||||
static int ext2_chmod(struct vnode *, int, struct ucred *, struct thread *); | static int ext2_chmod(struct vnode *, int, struct ucred *, struct thread *); | ||||
static int ext2_chown(struct vnode *, uid_t, gid_t, struct ucred *, | static int ext2_chown(struct vnode *, uid_t, gid_t, struct ucred *, | ||||
struct thread *); | struct thread *); | ||||
static vop_close_t ext2_close; | static vop_close_t ext2_close; | ||||
▲ Show 20 Lines • Show All 705 Lines • ▼ Show 20 Lines | if (tvp && ((VTOI(tvp)->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || | ||||
goto abortit; | goto abortit; | ||||
} | } | ||||
/* | /* | ||||
* Renaming a file to itself has no effect. The upper layers should | * Renaming a file to itself has no effect. The upper layers should | ||||
* not call us in that case. Temporarily just warn if they do. | * not call us in that case. Temporarily just warn if they do. | ||||
*/ | */ | ||||
if (fvp == tvp) { | if (fvp == tvp) { | ||||
printf("ext2_rename: fvp == tvp (can't happen)\n"); | SDT_PROBE2(ext2fs, , vnops, trace, 1, | ||||
"rename: fvp == tvp (can't happen)"); | |||||
error = 0; | error = 0; | ||||
goto abortit; | goto abortit; | ||||
} | } | ||||
if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) | if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) | ||||
goto abortit; | goto abortit; | ||||
dp = VTOI(fdvp); | dp = VTOI(fdvp); | ||||
ip = VTOI(fvp); | ip = VTOI(fvp); | ||||
▲ Show 20 Lines • Show All 1,512 Lines • Show Last 20 Lines |