summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/aops.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-26 07:50:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-26 07:50:56 +0100
commit986fb2e0532b1b0fa1e8312fbc38b9e7ed826547 (patch)
treee571ff6c8cd4bedfd49181125f0bd2993546ed24 /fs/ocfs2/aops.c
parent24438e46268c721e14c5c888386af85c9e1c5db1 (diff)
parent2e6e902d185027f8e3cb8b7305238f7e35d6a436 (diff)
downloadtalos-obmc-linux-986fb2e0532b1b0fa1e8312fbc38b9e7ed826547.tar.gz
talos-obmc-linux-986fb2e0532b1b0fa1e8312fbc38b9e7ed826547.zip
Merge 4.20-rc4 into char-misc-next
We want the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r--fs/ocfs2/aops.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index da578ad4c08f..eb1ce30412dc 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -2411,8 +2411,16 @@ static int ocfs2_dio_end_io(struct kiocb *iocb,
/* this io's submitter should not have unlocked this before we could */
BUG_ON(!ocfs2_iocb_is_rw_locked(iocb));
- if (bytes > 0 && private)
- ret = ocfs2_dio_end_io_write(inode, private, offset, bytes);
+ if (bytes <= 0)
+ mlog_ratelimited(ML_ERROR, "Direct IO failed, bytes = %lld",
+ (long long)bytes);
+ if (private) {
+ if (bytes > 0)
+ ret = ocfs2_dio_end_io_write(inode, private, offset,
+ bytes);
+ else
+ ocfs2_dio_free_write_ctx(inode, private);
+ }
ocfs2_iocb_clear_rw_locked(iocb);
OpenPOWER on IntegriCloud