All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Waiman Long <llong@redhat.com>
Cc: Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>,
	Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org, audit@vger.kernel.org,
	Richard Guy Briggs <rgb@redhat.com>,
	Ricardo Robaina <rrobaina@redhat.com>
Subject: Re: [PATCH 1/2] audit: Quit audit_free_names() early if name list empty
Date: Wed, 21 Jan 2026 05:26:23 +0000	[thread overview]
Message-ID: <20260121052623.GC3183987@ZenIV> (raw)
In-Reply-To: <84955de9-823f-4b3d-9107-f7d4aee38b88@redhat.com>

On Tue, Jan 20, 2026 at 11:08:45PM -0500, Waiman Long wrote:
> 
> On 1/20/26 10:11 PM, Al Viro wrote:
> > On Tue, Jan 20, 2026 at 09:35:08PM -0500, Waiman Long wrote:
> > > Optimize audit_free_names() by quitting early if the name list is empty.
> > > This eliminates the need to acquire and release the fs_struct spinlock
> > > in path_put().
> > Why would path_put() go anywhere need fs_struct spinlock???
> > 
> path_put() is defined in include/linux/fs_struct.h. It calls
> read_seq{un}lock_excl(&fs->seq) which, in turn, acquires the releases the
> spinlock underneath the seqlock_t.

Really?  Which kernel would that be?  On mainline we have

; git grep -n -w path_put include/linux/fs_struct.h
; $ git grep -C 6 'void path_put\>' fs/namei.c
fs/namei.c-/**
fs/namei.c- * path_put - put a reference to a path
fs/namei.c- * @path: path to put the reference to
fs/namei.c- *
fs/namei.c- * Given a path decrement the reference count to the dentry and the vfsmount.
fs/namei.c- */
fs/namei.c:void path_put(const struct path *path)
fs/namei.c-{
fs/namei.c-     dput(path->dentry);
fs/namei.c-     mntput(path->mnt);
fs/namei.c-}
fs/namei.c-EXPORT_SYMBOL(path_put);
fs/namei.c-
;

  reply	other threads:[~2026-01-21  5:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21  2:35 [PATCH 1/2] audit: Quit audit_free_names() early if name list empty Waiman Long
2026-01-21  2:35 ` [PATCH 2/2] audit: Call path_{put,get}() in audit_alloc_name()/audit_free_names() only when necessary Waiman Long
2026-01-21  3:11 ` [PATCH 1/2] audit: Quit audit_free_names() early if name list empty Al Viro
2026-01-21  4:08   ` Waiman Long
2026-01-21  5:26     ` Al Viro [this message]
2026-01-21 15:09       ` Waiman Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260121052623.GC3183987@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=audit@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llong@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=rgb@redhat.com \
    --cc=rrobaina@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.