Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[sfrench/cifs-2.6.git] / fs / compat.c
index 8754e9aa14ad2ee9b37598ffd517235a9266b572..be6e48b0a46c269d55b4befcdedaf1750e1e233f 100644 (file)
@@ -936,6 +936,8 @@ static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
        }
        dirent = buf->previous;
        if (dirent) {
+               if (signal_pending(current))
+                       return -EINTR;
                if (__put_user(offset, &dirent->d_off))
                        goto efault;
        }
@@ -1020,6 +1022,8 @@ static int compat_filldir64(struct dir_context *ctx, const char *name,
        dirent = buf->previous;
 
        if (dirent) {
+               if (signal_pending(current))
+                       return -EINTR;
                if (__put_user_unaligned(offset, &dirent->d_off))
                        goto efault;
        }