public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: amir73il@gmail.com, hu1.chen@intel.com, miklos@szeredi.hu,
	malini.bhandaru@intel.com, tim.c.chen@intel.com,
	mikko.ylinen@intel.com, lizhen.you@intel.com,
	linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC v3 1/5] cleanup: Fix discarded const warning when defining lock guard
Date: Tue, 26 Mar 2024 09:23:22 -0700	[thread overview]
Message-ID: <87a5mlotc5.fsf@intel.com> (raw)
In-Reply-To: <20240326-daheim-aluminium-810603172600@brauner>

Christian Brauner <brauner@kernel.org> writes:

> On Tue, Mar 26, 2024 at 11:53:12AM +0100, Christian Brauner wrote:
>> On Mon, Mar 25, 2024 at 05:50:55PM -0700, Vinicius Costa Gomes wrote:
>> > Christian Brauner <brauner@kernel.org> writes:
>> > 
>> > >
>> > > So something like this? (Amir?)
>> > >
>> > >  
>> > > -DEFINE_LOCK_GUARD_1(cred, const struct cred, _T->lock = override_creds_light(_T->lock),
>> > > -	     revert_creds_light(_T->lock));
>> > > +DEFINE_LOCK_GUARD_1(cred, struct cred,
>> > > +		    _T->lock = (struct cred *)override_creds_light(_T->lock),
>> > > +		    revert_creds_light(_T->lock));
>> > > +
>> > > +#define cred_guard(_cred) guard(cred)(((struct cred *)_cred))
>> > > +#define cred_scoped_guard(_cred) scoped_guard(cred, ((struct cred *)_cred))
>> > >  
>> > >  /**
>> > >   * get_new_cred_many - Get references on a new set of credentials
>> > 
>> > Thinking about proposing a PATCH version (with these suggestions applied), Amir
>> > has suggested in the past that I should propose two separate series:
>> >  (1) introducing the guard helpers + backing file changes;
>> >  (2) overlayfs changes;
>> > 
>> > Any new ideas about this? Or should I go with this plan?
>> 
>> I mean make it two separate patches and I can provide Amir with a stable
>> branch for the cleanup guards. I think that's what he wanted.
>
> But send them out in one series ofc. Amir and I can sort this if needed.

Yeah, understood.


Thank you,
-- 
Vinicius

  reply	other threads:[~2024-03-26 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16  5:16 [RFC v3 0/5] overlayfs: Optimize override/revert creds Vinicius Costa Gomes
2024-02-16  5:16 ` [RFC v3 1/5] cleanup: Fix discarded const warning when defining lock guard Vinicius Costa Gomes
2024-03-18 15:13   ` Christian Brauner
2024-03-18 15:57     ` Christian Brauner
2024-03-26  0:50       ` Vinicius Costa Gomes
2024-03-26 10:53         ` Christian Brauner
2024-03-26 13:19           ` Christian Brauner
2024-03-26 16:23             ` Vinicius Costa Gomes [this message]
2024-03-18 21:54     ` Vinicius Costa Gomes
2024-02-16  5:16 ` [RFC v3 2/5] cleanup: Fix discarded const warning when defining guard Vinicius Costa Gomes
2024-02-16  5:16 ` [RFC v3 3/5] cred: Add a light version of override/revert_creds() Vinicius Costa Gomes
2024-02-16  5:16 ` [RFC v3 4/5] fs: Optimize credentials reference count for backing file ops Vinicius Costa Gomes
2024-02-16  5:16 ` [RFC v3 5/5] overlayfs: Optimize credentials usage Vinicius Costa Gomes

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=87a5mlotc5.fsf@intel.com \
    --to=vinicius.gomes@intel.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=hu1.chen@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=lizhen.you@intel.com \
    --cc=malini.bhandaru@intel.com \
    --cc=mikko.ylinen@intel.com \
    --cc=miklos@szeredi.hu \
    --cc=tim.c.chen@intel.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