diff mbox series

[5/6] btrfs: send: remove old TODO regarding ERESTARTSYS

Message ID 00c674ac373f6f96b91c557f0f9782932462c273.1655299339.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series More send v2 updates: otime, fileattr | expand

Commit Message

David Sterba June 15, 2022, 1:25 p.m. UTC
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 | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index d8d4f062cd4f..f6469c7666c9 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -580,15 +580,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;
 	}