[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa3bbf2c-8079-4bdf-b106-a0641069080b@kernel.dk>
Date: Fri, 7 Mar 2025 09:18:32 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Mateusz Guzik <mjguzik@...il.com>, brauner@...nel.org
Cc: viro@...iv.linux.org.uk, jack@...e.cz, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, io-uring@...r.kernel.org,
audit@...r.kernel.org
Subject: Re: [PATCH] fs: support filename refcount without atomics
> +static inline void makeatomicname(struct filename *name)
> +{
> + VFS_BUG_ON(IS_ERR_OR_NULL(name));
> + /*
> + * The name can legitimately already be atomic if it was cached by audit.
> + * If switching the refcount to atomic, we need not to know we are the
> + * only non-atomic user.
> + */
> + VFS_BUG_ON(name->owner != current && !name->is_atomic);
> + /*
> + * Don't bother branching, this is a store to an already dirtied cacheline.
> + */
> + name->is_atomic = true;
> +}
Should this not depend on audit being enabled? io_uring without audit is
fine.
--
Jens Axboe
Powered by blists - more mailing lists