From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35EE5C3F2CE for ; Wed, 4 Mar 2020 16:11:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 016AB215A4 for ; Wed, 4 Mar 2020 16:11:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="M6T8IJrP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729838AbgCDQLK (ORCPT ); Wed, 4 Mar 2020 11:11:10 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:37771 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729823AbgCDQLK (ORCPT ); Wed, 4 Mar 2020 11:11:10 -0500 Received: by mail-io1-f66.google.com with SMTP id c17so3003090ioc.4 for ; Wed, 04 Mar 2020 08:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hMEhfSBOuHBIl6yeEV5DUSKkA5QymXhcDODBiotx5S4=; b=M6T8IJrP2imFH0Yrd72S712RTyLiBCBZZIWukQqQGCNrzxUDeKQu+PKXQBiP9CDW2H mlHwDsX+W9ASgLJqXkUJnHsYp6dMv5PNAIM+ZT80/uVANpT/Tbmh4N59WO3elb0FAsQC gfqYvlbSsf1UyETpTERI2GLvpo1mqkHwGPlGk= 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=hMEhfSBOuHBIl6yeEV5DUSKkA5QymXhcDODBiotx5S4=; b=fhUw4A2hYCi1+aqpScUaR0/34qS4UiNBR/0Z5t6oN7/nS7EK9W/xBtGLyGGPfgLcSL HbjnhE1WfCgj3lYZo3YeM3b+IYMWaeox3u9PIyscMNMs9m9oeNV/PFPSttU79uYKtjcP F8WTAdhx1PC8+m8HJWFjvgqmble+a7W+HzCinZ29QjIugj6aWiH7jjjaYIjaSpdnTuZX uNJOYWWkCUWnJ9aGYe/iLl8ae7ArNpKz8wY2ElKxwftKUzzNhKKZ/2GjCDZL+suBSEWR XYEdE+34BhtVKzsrc7KiPiQ15mAD6BFeoRj/vhXamq4zkaLYjL+9c/ND6x2wOfQGcLQt OiQg== X-Gm-Message-State: ANhLgQ0C1/geto/ZQlH73Wiqg9spVKpXnv80JOlqjox3QVujSNzvM6RV D4saYLHFh9DH3DCMX5qCo0M6udRwk7OSGnxS+1wf/Q== X-Google-Smtp-Source: ADFU+vv3dF1eDGfu6HnlNnsm2H3QO09qbn9v3Km2uZitDG2c+ztP3h8bSrNDMa2kQSpJfI9anLFWwxmDff5HPQtsH5U= X-Received: by 2002:a6b:f409:: with SMTP id i9mr2669177iog.212.1583338269532; Wed, 04 Mar 2020 08:11:09 -0800 (PST) MIME-Version: 1.0 References: <158230810644.2185128.16726948836367716086.stgit@warthog.procyon.org.uk> <158230818859.2185128.8921928947340497977.stgit@warthog.procyon.org.uk> In-Reply-To: <158230818859.2185128.8921928947340497977.stgit@warthog.procyon.org.uk> From: Miklos Szeredi Date: Wed, 4 Mar 2020 17:10:58 +0100 Message-ID: Subject: Re: [PATCH 10/17] fsinfo: Allow mount information to be queried [ver #17] To: David Howells Cc: Al Viro , Ian Kent , Miklos Szeredi , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Feb 21, 2020 at 7:03 PM David Howells wrote: + > +/* > + * Return information about the submounts relative to path. > + */ > +int fsinfo_generic_mount_children(struct path *path, struct fsinfo_context *ctx) > +{ > + struct fsinfo_mount_child record; > + struct mount *m, *child; > + > + if (!path->mnt) > + return -ENODATA; > + > + m = real_mount(path->mnt); > + > + rcu_read_lock(); > + list_for_each_entry_rcu(child, &m->mnt_mounts, mnt_child) { mnt_mounts is not using _rcu primitives, so why is this rcu safe? Thanks, Miklos