summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2025-04-16 10:53:58 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2025-05-29 12:31:23 +0200
commitc31f91c6af96a5eb0632f4aee8d4e39cad7d7559 (patch)
treee67f53aaeee84bffbf267e20fe4f65f73f3721e0 /include
parentf3cb8bd908c72eb7b766eca05aac1685749eff02 (diff)
fuse: don't allow signals to interrupt getdents copying
When getting the directory contents, the entries are first fetched to a kernel buffer, then they are copied to userspace with dir_emit(). This second phase is non-blocking as long as the userspace buffer is not paged out, making it interruptible makes zero sense. Overload d_type as flags, since it only uses 4 bits from 32. Reviewed-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 016b0fe1536e..0f2a1a572e3a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2073,6 +2073,9 @@ struct dir_context {
loff_t pos;
};
+/* If OR-ed with d_type, pending signals are not checked */
+#define FILLDIR_FLAG_NOINTR 0x1000
+
/*
* These flags let !MMU mmap() govern direct device mapping vs immediate
* copying more easily for MAP_PRIVATE, especially for ROM filesystems.