]> git.proxmox.com Git - mirror_zfs.git/commit - config/kernel-vfs-rw-iterate.m4
Fix loop device becomes read-only
authorChunwei Chen <tuxoko@gmail.com>
Mon, 6 Mar 2017 17:20:20 +0000 (09:20 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 6 Mar 2017 17:20:20 +0000 (09:20 -0800)
commit7a789346afec87a89c4cde465faf9be4996db556
tree27f0c2a405784e439ba62505747dac712fbee6b9
parentfb963d33ee0dd350143ba1c9cd35d5f7d86910d2
Fix loop device becomes read-only

Commit 933ec99 removes read and write from f_op because the vfs layer will
select iter_write or aio_write automatically. However, for Linux <= 4.0,
loop_set_fd will actually check f_op->write and set read-only if not exists.
This patch add them back and use the generic do_sync_{read,write} for
aio_{read,write} and new_sync_{read,write} for {read,write}_iter.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #5776
Closes #5855
config/kernel-vfs-rw-iterate.m4
module/zfs/zpl_file.c