]> granicus.if.org Git - strace/commitdiff
btrfs: use umove_or_printaddr_ignore_syserror instead of u_error mangling
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 14 Mar 2018 20:08:34 +0000 (21:08 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 12 Apr 2018 23:00:28 +0000 (23:00 +0000)
* btrfs.c (MPERS_PRINTER_DECL(btrfs_ioctl)) <case
BTRFS_IOC_TREE_SEARCH_V2>: Use umove_or_printaddr_ignore_syserror
instead of tcp->u_error mangling around umove_or_printaddr call.

btrfs.c

diff --git a/btrfs.c b/btrfs.c
index 6f47a34a133c9162ab7b36c27c6f9b23c4bbcf52..b59ba2c7c1bcf4fe5c7dd1b4ded3714601a71151 100644 (file)
--- a/btrfs.c
+++ b/btrfs.c
@@ -1181,11 +1181,10 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                else if (syserror(tcp)) {
                        if (tcp->u_error == EOVERFLOW) {
                                tprints(" => ");
-                               tcp->u_error = 0;
-                               if (!umove_or_printaddr(tcp, arg, &args))
+                               if (!umove_or_printaddr_ignore_syserror(tcp,
+                                   arg, &args))
                                        tprintf("{buf_size=%" PRIu64 "}",
                                                (uint64_t)args.buf_size);
-                               tcp->u_error = EOVERFLOW;
                        }
                        break;
                } else