Re: [PATCH 1/2] audit: Quit audit_free_names() early if name list empty

Waiman Long <[email protected]>
Newsgroups org.kernel.vger.audit,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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.

Cheers,
Longman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.