Re: [RFC v3 1/5] cleanup: Fix discarded const warning when defining lock guard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Brauner <brauner@xxxxxxxxxx> 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?


Cheers,
-- 
Vinicius




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux