diff options
| author | Miklos Szeredi <mszeredi@redhat.com> | 2025-04-16 10:53:58 +0200 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2025-05-29 12:31:23 +0200 |
| commit | c31f91c6af96a5eb0632f4aee8d4e39cad7d7559 (patch) | |
| tree | e67f53aaeee84bffbf267e20fe4f65f73f3721e0 /fs/fuse | |
| parent | fuse: support large folios for writeback (diff) | |
| download | linux-c31f91c6af96a5eb0632f4aee8d4e39cad7d7559.tar.gz linux-c31f91c6af96a5eb0632f4aee8d4e39cad7d7559.zip | |
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 'fs/fuse')
| -rw-r--r-- | fs/fuse/readdir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/readdir.c b/fs/fuse/readdir.c index 46b7146f2c0d..59defad9d05e 100644 --- a/fs/fuse/readdir.c +++ b/fs/fuse/readdir.c @@ -120,7 +120,7 @@ static bool fuse_emit(struct file *file, struct dir_context *ctx, fuse_add_dirent_to_cache(file, dirent, ctx->pos); return dir_emit(ctx, dirent->name, dirent->namelen, dirent->ino, - dirent->type); + dirent->type | FILLDIR_FLAG_NOINTR); } static int parse_dirfile(char *buf, size_t nbytes, struct file *file, @@ -422,7 +422,7 @@ static enum fuse_parse_result fuse_parse_cache(struct fuse_file *ff, if (ff->readdir.pos == ctx->pos) { res = FOUND_SOME; if (!dir_emit(ctx, dirent->name, dirent->namelen, - dirent->ino, dirent->type)) + dirent->ino, dirent->type | FILLDIR_FLAG_NOINTR)) return FOUND_ALL; ctx->pos = dirent->off; } |
