Skip to content

Commit c850baa

Browse files
committed
Set written to status if do_nova_inplace_file_write fails in memcpy.
This helps cleanup the incomplete write.
1 parent 0a05ee4 commit c850baa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/nova/dax.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,10 @@ ssize_t do_nova_inplace_file_write(struct file *filp,
760760
if (status >= 0)
761761
status = -EFAULT;
762762
}
763-
if (status < 0)
763+
if (status < 0) {
764+
written = status;
764765
break;
766+
}
765767

766768
if (hole_fill) {
767769
update_log = true;

0 commit comments

Comments
 (0)