]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: do not block RWF_NOWAIT dio write on unallocated space
authorJan Kara <jack@suse.cz>
Wed, 8 Jul 2020 15:35:16 +0000 (17:35 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Aug 2020 05:05:46 +0000 (01:05 -0400)
commit0ba2751425e8d83ba6f639eb868c12fd735ab608
tree6b42f17fa36f96a449d665d60002330acf90f14d
parent1ceed7f7a681943be65131eab3078eb3cc598c86
ext4: do not block RWF_NOWAIT dio write on unallocated space

Since commit b5b63bfd20b2 ("ext4: introduce direct I/O write using iomap
infrastructure") we don't properly bail out of RWF_NOWAIT direct IO
write if underlying blocks are not allocated. Also
ext4_dio_write_checks() does not honor RWF_NOWAIT when re-acquiring
i_rwsem. Fix both issues.

Fixes: b5b63bfd20b2 ("ext4: introduce direct I/O write using iomap infrastructure")
Cc: stable@kernel.org
Reported-by: Filipe Manana <fdmanana@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20200708153516.9507-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/file.c