btrfs: send: remove old TODO regarding ERESTARTSYS
authorDavid Sterba <dsterba@suse.com>
Thu, 2 Jun 2022 13:40:46 +0000 (15:40 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:37 +0000 (17:45 +0200)
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 <dsterba@suse.com>
fs/btrfs/send.c

index 8f88df368c31d812f3ec2dc7fa8185185683a0a9..b2a895563f6d85d44006b7581dab4a997b082ff0 100644 (file)
@@ -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;
        }