Commit 3a2c0e55 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

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.
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 51bf8d3c
...@@ -4107,6 +4107,12 @@ static int f2fs_ioc_decompress_file(struct file *filp) ...@@ -4107,6 +4107,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)
...@@ -4181,6 +4187,12 @@ static int f2fs_ioc_compress_file(struct file *filp) ...@@ -4181,6 +4187,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment