blob: 534ec1bc8a83543a8e1704f37d17133251089fb8 [file] [log] [blame] [raw]
Allow read(2)ing directories in FUSE.
diff -ru --exclude-from freebsd-src-diff-exclude-names /var/archive3/public/freebsd-releng-10.4-src/sys/fs/fuse/fuse_vnops.c freebsd-10.4/sys/fs/fuse/fuse_vnops.c
--- /var/archive3/public/freebsd-releng-10.4-src/sys/fs/fuse/fuse_vnops.c 2017-09-29 08:20:06.000000000 +0800
+++ freebsd-10.4/sys/fs/fuse/fuse_vnops.c 2019-11-07 13:28:10.454275000 +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.