Linux-CIFS Archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: NeilBrown <neil@brown.name>, linux-cifs@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Namjae Jeon <linkinjeon@kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Stefan Metzmacher <metze@samba.org>,
	Steve French <smfrench@gmail.com>, Tom Talpey <tom@talpey.com>
Subject: Re: ksmbd: Use common error handling code in ksmbd_vfs_path_lookup()
Date: Sat, 4 Oct 2025 14:36:23 +0200	[thread overview]
Message-ID: <9e1d6597-156c-4ecc-b188-75089e175dc0@web.de> (raw)
In-Reply-To: <175957657719.1793333.15585390544259019306@noble.neil.brown.name>

>>> This is based on the pattern in kern_path_parent() and
>>> __start_removing_path().

You influenced the software evolution also according to the availability
of a function like kern_path_locked_negative().
https://elixir.bootlin.com/linux/v6.17/source/fs/namei.c#L2770-L2792

See also the following commits:
* 76a53de6f7ff0641570364234fb4489f4d4fc8e9 ("VFS/audit: introduce kern_path_parent()
  for audit") from 2025-09-23

* a681b7c17dd21d5aa0da391ceb27a2007ba970a4 ("fs: ensure that *path_locked*() helpers
  leave passed path pristine") from 2025-04-16


>> Do you propose that affected software components may benefit more from
>> the application of scope-based resource management?
>> https://elixir.bootlin.com/linux/v6.17/source/include/linux/path.h#L22-L28
> 
> Exactly.  It doesn't suit every case, but if you are going to make
> changes to the exit paths of a function, I think it is worth
> considering if scope-based code will work well for the particular
> function.

Is there a need to clarify possibilities for the usage of the macro “__free_path_put” further?

Regards,
Markus

      reply	other threads:[~2025-10-04 12:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 18:45 [PATCH] ksmbd: Use common error handling code in ksmbd_vfs_path_lookup() Markus Elfring
2025-10-03 22:30 ` NeilBrown
2025-10-04  8:45   ` Markus Elfring
2025-10-04 11:16     ` NeilBrown
2025-10-04 12:36       ` Markus Elfring [this message]

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=9e1d6597-156c-4ecc-b188-75089e175dc0@web.de \
    --to=markus.elfring@web.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=neil@brown.name \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.com \
    --cc=tom@talpey.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).