aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/dir.c5
-rw-r--r--fs/ext4/namei.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 33f5e2a50cf8..ebfcb8999db2 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -150,6 +150,11 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
150 while (ctx->pos < inode->i_size) { 150 while (ctx->pos < inode->i_size) {
151 struct ext4_map_blocks map; 151 struct ext4_map_blocks map;
152 152
153 if (fatal_signal_pending(current)) {
154 err = -ERESTARTSYS;
155 goto errout;
156 }
157 cond_resched();
153 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); 158 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb);
154 map.m_len = 1; 159 map.m_len = 1;
155 err = ext4_map_blocks(NULL, inode, &map, 0); 160 err = ext4_map_blocks(NULL, inode, &map, 0);
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 48e4b8907826..db98f89f737f 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1107,6 +1107,11 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
1107 } 1107 }
1108 1108
1109 while (1) { 1109 while (1) {
1110 if (signal_pending(current)) {
1111 err = -ERESTARTSYS;
1112 goto errout;
1113 }
1114 cond_resched();
1110 block = dx_get_block(frame->at); 1115 block = dx_get_block(frame->at);
1111 ret = htree_dirblock_to_tree(dir_file, dir, block, &hinfo, 1116 ret = htree_dirblock_to_tree(dir_file, dir, block, &hinfo,
1112 start_hash, start_minor_hash); 1117 start_hash, start_minor_hash);