linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Christian Brauner <brauner@kernel.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Amir Goldstein <amir73il@gmail.com>,
	Josef Bacik <josef@toxicpanda.com>,
	linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH RFC v2 2/4] ovl: specify layers via file descriptors
Date: Fri, 11 Oct 2024 23:27:55 +0100	[thread overview]
Message-ID: <20241011222755.GF4017910@ZenIV> (raw)
In-Reply-To: <20241011-work-overlayfs-v2-2-1b43328c5a31@kernel.org>

On Fri, Oct 11, 2024 at 11:45:51PM +0200, Christian Brauner wrote:

> +static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param,
> +			   enum ovl_opt layer)
> +{
> +	struct path path __free(path_put) = {};
> +	char *buf __free(kfree) = NULL;

Move down to the scope where it's used.  And just initialize
with kmalloc().

> +	char *layer_name;
> +	int err = 0;
> +
> +	if (param->type == fs_value_is_file) {
> +		buf = kmalloc(PATH_MAX, GFP_KERNEL_ACCOUNT);
> +		if (!buf)
> +			return -ENOMEM;

  reply	other threads:[~2024-10-11 22:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 21:45 [PATCH RFC v2 0/4] ovl: specify layers via file descriptors Christian Brauner
2024-10-11 21:45 ` [PATCH RFC v2 1/4] fs: add helper to use mount option as path or fd Christian Brauner
2024-10-12  7:21   ` Amir Goldstein
2024-10-12  8:20     ` Amir Goldstein
2024-10-14  8:20       ` Christian Brauner
2024-10-11 21:45 ` [PATCH RFC v2 2/4] ovl: specify layers via file descriptors Christian Brauner
2024-10-11 22:27   ` Al Viro [this message]
2024-10-12  8:25   ` Amir Goldstein
2024-10-12 10:37     ` Christian Brauner
2024-10-13 14:54       ` Amir Goldstein
2024-10-11 21:45 ` [PATCH RFC v2 3/4] selftests: use shared header Christian Brauner
2024-10-12  7:33   ` Amir Goldstein
2024-10-11 21:45 ` [PATCH RFC v2 4/4] selftests: add overlayfs fd mounting selftests Christian Brauner
2024-10-12  7:18   ` Amir Goldstein

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=20241011222755.GF4017910@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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 NNTP newsgroup(s).