aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/fuse/fuse_vnops.c37
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c2
2 files changed, 13 insertions, 26 deletions
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index 32872e8f3f3a..b782146b7278 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -877,6 +877,9 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap)
pid_t pid;
int err;
+ if ((ap->a_flags & COPY_FILE_RANGE_CLONE) != 0)
+ return (EXTERROR(ENOSYS, "Cannot clone"));
+
if (mp == NULL || mp != vnode_mount(outvp))
return (EXTERROR(ENOSYS, "Mount points do not match"));
@@ -1219,36 +1222,20 @@ fuse_vnop_getattr(struct vop_getattr_args *ap)
struct vattr *vap = ap->a_vap;
struct ucred *cred = ap->a_cred;
struct thread *td = curthread;
-
int err = 0;
- int dataflags;
-
- dataflags = fuse_get_mpdata(vnode_mount(vp))->dataflags;
- /* Note that we are not bailing out on a dead file system just yet. */
-
- if (!(dataflags & FSESS_INITED)) {
- if (!vnode_isvroot(vp)) {
- fdata_set_dead(fuse_get_mpdata(vnode_mount(vp)));
- return (EXTERROR(ENOTCONN, "FUSE daemon is not "
- "initialized"));
- } else {
- goto fake;
- }
- }
err = fuse_internal_getattr(vp, vap, cred, td);
if (err == ENOTCONN && vnode_isvroot(vp)) {
- /* see comment in fuse_vfsop_statfs() */
- goto fake;
- } else {
- return err;
+ /*
+ * We want to seem a legitimate fs even if the daemon is dead,
+ * so that, eg., we can still do path based unmounting after
+ * the daemon dies.
+ */
+ err = 0;
+ bzero(vap, sizeof(*vap));
+ vap->va_type = vnode_vtype(vp);
}
-
-fake:
- bzero(vap, sizeof(*vap));
- vap->va_type = vnode_vtype(vp);
-
- return 0;
+ return err;
}
/*
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 4ffc4ce5c29f..67e33193ecec 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -218,7 +218,7 @@ NFSD_VNET_DEFINE_STATIC(u_char *, nfsrv_dnsname) = NULL;
*/
static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 1, 0, 0, 0, 0, 0, 0 };
/* local functions */