summaryrefslogtreecommitdiff
path: root/include/linux/errseq.h
diff options
context:
space:
mode:
authorErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>2018-10-08 20:58:23 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-05 17:58:50 +0100
commitc5a1dc256cc2ac6c08f637994e513a8cb65be3d6 (patch)
treebd4d4943efc33f5f88551cd646974505c1d54d24 /include/linux/errseq.h
parentbcb8e0a236989f8efccb6ca2218ad4871a26c00b (diff)
direct-io: allow direct writes to empty inodes
[ Upstream commit 8b9433eb4de3c26a9226c981c283f9f4896ae030 ] On a DIO_SKIP_HOLES filesystem, the ->get_block() method is currently not allowed to create blocks for an empty inode. This confusion comes from trying to bit shift a negative number, so check the size of the inode first. The problem is most visible for hfsplus, because the fallback to buffered I/O doesn't happen and the write fails with EIO. This is in part the fault of the module, because it gives a wrong return value on ->get_block(); that will be fixed in a separate patch. Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/errseq.h')
0 files changed, 0 insertions, 0 deletions