From: David Sterba Date: Thu, 2 Jun 2022 13:40:46 +0000 (+0200) Subject: btrfs: send: remove old TODO regarding ERESTARTSYS X-Git-Tag: microblaze-v6.1~149^2~67 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=cec3dad943f478eb8540964d2fac934a7b59d172;p=linux-2.6-microblaze.git btrfs: send: remove old TODO regarding ERESTARTSYS The whole send operation is restartable and handling properly a buffer write may not be easy. We can't know what caused that and if a short delay and retry will fix it or how many retries should be performed in case it's a temporary condition. The error value is returned to the ioctl caller so in case it's transient problem, the user would be notified about the reason. Remove the TODO note as there's no plan to handle ERESTARTSYS. Signed-off-by: David Sterba --- diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 8f88df368c31..b2a895563f6d 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -582,15 +582,10 @@ static int write_buf(struct file *filp, const void *buf, u32 len, loff_t *off) while (pos < len) { ret = kernel_write(filp, buf + pos, len - pos, off); - /* TODO handle that correctly */ - /*if (ret == -ERESTARTSYS) { - continue; - }*/ if (ret < 0) return ret; - if (ret == 0) { + if (ret == 0) return -EIO; - } pos += ret; }