ext4: allow readdir()'s of large empty directories to be interrupted
[deliverable/linux.git] / fs / ext4 / namei.c
index 48e4b8907826eca52a1e94e14bdfdb0fd2240c56..db98f89f737f05827cc4371c939a29ec31ee4ef2 100644 (file)
@@ -1107,6 +1107,11 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
        }
 
        while (1) {
+               if (signal_pending(current)) {
+                       err = -ERESTARTSYS;
+                       goto errout;
+               }
+               cond_resched();
                block = dx_get_block(frame->at);
                ret = htree_dirblock_to_tree(dir_file, dir, block, &hinfo,
                                             start_hash, start_minor_hash);
This page took 0.030423 seconds and 5 git commands to generate.