]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Make sure not to return short direct writes
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 24 Mar 2022 22:13:26 +0000 (23:13 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 24 Mar 2022 22:40:43 +0000 (23:40 +0100)
commit2563eb29ebff58c4afe0383e47371bfa418fed46
tree473c22c835a05f8177016a401c82749b041f37c4
parentecfbe18c7a049c8f1a74c185c1a84d28024a01fc
gfs2: Make sure not to return short direct writes

When direct writes fail with -ENOTBLK because we're writing into a
hole (gfs2_iomap_begin()) or because of a page invalidation failure
(iomap_dio_rw()), we're falling back to buffered writes.  In that case,
when we lose the inode glock in gfs2_file_buffered_write(), we want to
re-acquire it instead of returning a short write.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c