Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1764675pxy; Sun, 2 May 2021 01:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLH28R6en83bqJgDwTKAwExhomrZp8opWJ1UYPwgNXN/2s/oez+7IcGWlpeIwYrNl6rwW/ X-Received: by 2002:aa7:d3c2:: with SMTP id o2mr14434753edr.111.1619944930985; Sun, 02 May 2021 01:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619944930; cv=none; d=google.com; s=arc-20160816; b=JdVJHH3a+khApy0+6S4o/J9DVks2oOv3+4m8xadxI/d5btldkOf/hn0HWZelvqnwpH MP7RlV2IhXYLR5A07xFl9Uxcf8d+WwuMj/EmFu32KOhFrmfoe9DExs6HgjRxhMxHCf8k UZ7DI/JbT8WY/15ZDIpo6FWvctZXedHgSOGMe4nDy1gnixGOtAJDbHqMAbjBQZ459dYf Vz2zer8M+N9lN0BxNNAz4z7kxQ0F0N86F28B3K13U0/S6YGfMR9FTPckzG+Bd6051wr2 P2xhdLGuFcxqBvYJRCRdET4rdDjEXdqULToqsNKqhcJ76Ny3R0wmvYIDfj3McoXXT7Ge ZfGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WLNkx73hcHcrQZ3KilQZwxG3DTJfVww0RQQLOCneQHc=; b=Fu1vCbsa9mES8nTv3h1jUesAdhzCeOctT0FD/nnq9THytDtcdyz/tZsF7KWq2q4d7M KAajMn4vxw/JINLa/kMnE598huUhbVBj8KqrhQUHtgWubnRs9SneCk51NfQqA0Ej9SGj 950j+/zXMkY1/acxQuDPzZggNp6ryUXX7BrvXROaBa+ByFLCwEPJSIv6BY+9KF54kQUn mtCQjL7LGgDH4vMwzw2qL1nmjNfr2qxKIK3PcjBW0m+5mGa1c4k+c7GJO+SMhNSDTiiX aaxBl0J1mt77dYUeFFSBEzDZDsJGwBz8j75abKIvdFYZ6Wbq9CDda7fpAn45k7GEzfOV jBsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u96t6QK9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p22si7548000ejm.148.2021.05.02.01.41.16; Sun, 02 May 2021 01:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u96t6QK9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbhEBIgV (ORCPT + 99 others); Sun, 2 May 2021 04:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbhEBIgV (ORCPT ); Sun, 2 May 2021 04:36:21 -0400 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052BCC06174A; Sun, 2 May 2021 01:35:29 -0700 (PDT) Received: by mail-oo1-xc34.google.com with SMTP id u48-20020a4a97330000b02901fa060b8066so590656ooi.8; Sun, 02 May 2021 01:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WLNkx73hcHcrQZ3KilQZwxG3DTJfVww0RQQLOCneQHc=; b=u96t6QK91NThmWMffJGUKZbNrihPegTeh5QQ3TN5DqkJT8bvNDNFbtvhN2sc5YeZk3 L2VPrmUlMkBVrwDBAGdaMSrZpBV1cIIGFgxZPrevLUQSHi9ujzb1iDRX09+/4T+HCCkh IMG2EDYU9koiOUt0kU9Z1VsEkLternAja9B6RFKdDqSkm+ALtXYpfQNDzyXDe2hX9heI ILIlpY1Wxq8RM2KKPyDCKdIRHsYPZf0lUCAwE6A91LbWLVXCt1TFXfJz5JPiQEaX/uW8 w9bcaLM0M7KwEWk6LAu3BIzX+Tt0yHS1s61JElqMhZ0ZXcTgFbx3sXDtop7S15mtyH2o jd3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WLNkx73hcHcrQZ3KilQZwxG3DTJfVww0RQQLOCneQHc=; b=XjY/AoXukXTluPCuou/Hze2WeiWlnsN7OgHHZGHBh0Cmx9hLqR/x5c8on60AbqCsYg lF//kK4eAmUo4X9FMw5gsy86a6UUAD84DBhVuL7dhGUPwY1ZKL1unOV7CW8lw1oSyrDp f0zPnCtv2WtaYbSEVa5yfHJL9+vmYVqEjALfpzTGr4MmS4sm+qwGJOHeuuXrbumpwPh+ YsTzskoY3UEYB7H96KxRSNuSRh8Or2IHMtLq5KvB+mJCVO8v1HVQ9Q8ep2qAkVxuJ8rV 1vMQX1x6e1D924apVkDt4f85OwsgU7G5UBylUhCcLqceOHNGQMRSjEzf2jQe92fGZHPm gEsQ== X-Gm-Message-State: AOAM531NkQSK53y+0zR9RLe6FEA0HYcoeJpLgxx7D7H3bDj3q/18PhRC x35+9psfGFwI5QylUfUtPvQyUElXwPABAnzL55mfnej9cGfDbQ== X-Received: by 2002:a4a:e934:: with SMTP id a20mr4356990ooe.27.1619944528389; Sun, 02 May 2021 01:35:28 -0700 (PDT) MIME-Version: 1.0 References: <20210430062632.21304-1-heiko.thiery@gmail.com> In-Reply-To: From: Heiko Thiery Date: Sun, 2 May 2021 10:35:17 +0200 Message-ID: Subject: Re: [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented To: Petr Vorel Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Hemminger Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Petr, Am Fr., 30. Apr. 2021 um 21:29 Uhr schrieb Petr Vorel : > > Hi, > > > > +++ b/lib/fs.c > > > @@ -30,6 +30,27 @@ > > > /* if not already mounted cgroup2 is mounted here for iproute2's use */ > > > #define MNT_CGRP2_PATH "/var/run/cgroup2" > > > > + > > > +#ifndef defined HAVE_HANDLE_AT > > This is also wrong, it must be: > > #ifndef HAVE_HANDLE_AT > > > > +struct file_handle { > > > + unsigned handle_bytes; > > > + int handle_type; > > > + unsigned char f_handle[]; > > > +}; > > > + > > > +int name_to_handle_at(int dirfd, const char *pathname, > > > + struct file_handle *handle, int *mount_id, int flags) > > > +{ > > > + return syscall(name_to_handle_at, 5, dirfd, pathname, handle, > > > + mount_id, flags); > > Also I overlooked bogus 5 parameter, why is here? Correct is: > > > return syscall(__NR_name_to_handle_at, dfd, pathname, handle, > > mount_id, flags); > Uh, one more typo on my side, sorry (dfd => dirfd): > return syscall(__NR_name_to_handle_at, dirfd, pathname, handle, > mount_id, flags); > Thanks for the review and finding the sloppiness. I really should test the changes before. Nevertheless, I will prepare a new version and test it this time. BR, -- Heiko