blob: 8a0e9421b9394ff7ff40f0cf0545080a07b4e03e [file] [log] [blame] [raw]
Allow read(2)ing directories in FUSE.
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/fs/fuse/fuse_vnops.c freebsd-11.1/sys/fs/fuse/fuse_vnops.c
--- /usr/src/sys/fs/fuse/fuse_vnops.c 2017-07-21 07:42:02.000000000 +0800
+++ freebsd-11.1/sys/fs/fuse/fuse_vnops.c 2020-01-26 13:58:28.518773000 +0800
--- /usr/src/sys/fs/fuse/fuse_vnops.c 2017-07-21 07:42:02.000000000 +0800
+++ /tmp/fuse_vnops.c 2020-01-26 14:02:25.527489000 +0800
@@ -517,7 +517,7 @@
if ((fvdat->flag & FN_SIZECHANGE) != 0)
vap->va_size = fvdat->filesize;
- if (vnode_isreg(vp) && (fvdat->flag & FN_SIZECHANGE) == 0) {
+ if ((vnode_isreg(vp) || vnode_isdir(vp)) && (fvdat->flag & FN_SIZECHANGE) == 0) {
/*
* This is for those cases when the file size changed without us
* knowing, and we want to catch up.