]> git.lttng.org Git - lttng-modules.git/commit
Fix: lookup_fdget_rcu removed in Linux 6.13.0-rc1
authorKienan Stewart <kstewart@efficios.com>
Wed, 22 Jan 2025 15:10:53 +0000 (15:10 +0000)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Jan 2025 19:13:34 +0000 (14:13 -0500)
commitcf735a45963ab3d6d46209c173a2d2b4c918a0da
tree84dbbc2f64a97795b6539edb5e1875858362ce50
parent643560cce60d183221a8afa9688f6a0db61dafd1
Fix: lookup_fdget_rcu removed in Linux 6.13.0-rc1

See upstream commit 8fd3395ec9051a52828fcca2328cb50a69dea8ef:

    commit 8fd3395ec9051a52828fcca2328cb50a69dea8ef
    Author: Al Viro <viro@zeniv.linux.org.uk>
    Date:   Wed Jul 31 11:49:04 2024 -0400

        get rid of ...lookup...fdget_rcu() family

        Once upon a time, predecessors of those used to do file lookup
        without bumping a refcount, provided that caller held rcu_read_lock()
        across the lookup and whatever it wanted to read from the struct
        file found.  When struct file allocation switched to SLAB_TYPESAFE_BY_RCU,
        that stopped being feasible and these primitives started to bump the
        file refcount for lookup result, requiring the caller to call fput()
        afterwards.

        But that turned them pointless - e.g.
                rcu_read_lock();
                file = lookup_fdget_rcu(fd);
                rcu_read_unlock();
        is equivalent to
                file = fget_raw(fd);
        and all callers of lookup_fdget_rcu() are of that form.  Similarly,
        task_lookup_fdget_rcu() calls can be replaced with calling fget_task().
        task_lookup_next_fdget_rcu() doesn't have direct counterparts, but
        its callers would be happier if we replaced it with an analogue that
        deals with RCU internally.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Change-Id: I98f1c617e8bd7ad9db7a9af2a1fa76c5eb26e8b8
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/wrapper/fdtable.h
include/wrapper/file_ref.h
src/lttng-abi.c
This page took 0.030248 seconds and 4 git commands to generate.