diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a82ad66e4664..c7d9778f3c1c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -4185,6 +4185,12 @@ static int f2fs_ioc_decompress_file(struct file *filp) count -= len; page_idx += len; + + cond_resched(); + if (fatal_signal_pending(current)) { + ret = -EINTR; + break; + } } if (!ret) @@ -4259,6 +4265,12 @@ static int f2fs_ioc_compress_file(struct file *filp) count -= len; page_idx += len; + + cond_resched(); + if (fatal_signal_pending(current)) { + ret = -EINTR; + break; + } } if (!ret)