fs: make cont_expand_zero interruptible
[firefly-linux-kernel-4.4.55.git] / fs / buffer.c
index 10fca21ee8aab4fdf1052076e5f70bdc964b3817..d0b4646dc8c8d9249205a5880f636f23d0602da8 100644 (file)
@@ -2254,6 +2254,11 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,
                err = 0;
 
                balance_dirty_pages_ratelimited(mapping);
+
+               if (unlikely(fatal_signal_pending(current))) {
+                       err = -EINTR;
+                       goto out;
+               }
        }
 
        /* page covers the boundary, find the boundary offset */