Yes, I meant that generic_perform_write() simply returns EINTR every time
when it is called.
So do_xino_fwrite() cannot escape from the loop.
  static ssize_t do_xino_fwrite(vfs_writef_t func, struct file *file,
void *kbuf,
           size_t size, loff_t *pos)
  {
  ..
    do {
       /* cannot escape from this loop */
      err = func(file, buf.u, size, pos);
    } while (err == -EAGAIN || err == -EINTR);
  ..
  }
Sorry for my ambiguity.
BTW, I tested your patch in my machine, and it seems working well.
If modifying 296291cd is not accepted, your patch will be the best solution.
Thanks!
2015-12-25 15:16 GMT+09:00 <[1][email protected]>:
Akihiro Suda:
> However, the bug is a regression caused by commit 296291cd ("mm: make
> sendfile(2) killable") to the upstream of Linux kernel.
> [2]https://github.com/torvalds/linux/commit/296291cd
> This produces infinite -EINTR loop in
mm/filemap.c:generic_perform_write().
> Perhaps it can also affect filesystems other than AUFS.
Why infinite?
generic_perform_write() simply returns EINTR, doesn't it?
J. R. Okajima
References
1. mailto:[email protected]
2. https://github.com/torvalds/linux/commit/296291cd
------------------------------------------------------------------------------