UPSTREAM: f2fs: allow f2fs_ioc_{,de}compress_file to be interrupted

This patch allows f2fs_ioc_{,de}compress_file() to be interrupted, so that,
userspace won't be blocked when manual {,de}compression on large file is
interrupted by signal.

Bug: 325092012
Change-Id: I020026926732b184f227621cd64506dae92a00a1
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 3a2c0e55f9)
This commit is contained in:
Chao Yu
2023-07-12 04:08:05 +08:00
committed by William McVicker
parent 24492cb6b9
commit 3b2e004494

View File

@@ -4185,6 +4185,12 @@ static int f2fs_ioc_decompress_file(struct file *filp)
count -= len; count -= len;
page_idx += len; page_idx += len;
cond_resched();
if (fatal_signal_pending(current)) {
ret = -EINTR;
break;
}
} }
if (!ret) if (!ret)
@@ -4259,6 +4265,12 @@ static int f2fs_ioc_compress_file(struct file *filp)
count -= len; count -= len;
page_idx += len; page_idx += len;
cond_resched();
if (fatal_signal_pending(current)) {
ret = -EINTR;
break;
}
} }
if (!ret) if (!ret)