In message: [linux-yocto][linux-yocto v6.1/standard/preempt-rt/base][PATCH] 
aufs: i_op: Add handling for au_pin_hdir_set_owner with RT kernel
on 05/01/2024 He Zhe wrote:

> In RT kernel rw_semaphore uses rt_mutex whose owner should be set to the
> task. Add a condition to handle both cases to avoid the following build error
> for PREEMPT_RT kernel.
> 
> fs/aufs/i_op.c: In function 'au_pin_hdir_set_owner':
> fs/aufs/i_op.c:639:52: error: 'struct rw_semaphore' has no member named 
> 'owner'
> 639 |         atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);

Applied.

I've also put it on 6.6 and staged it for master (for future reference
kernels).

Bruce

> 
> Signed-off-by: He Zhe <[email protected]>
> ---
>  fs/aufs/i_op.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c
> index a2416992a593..532382c880d8 100644
> --- a/fs/aufs/i_op.c
> +++ b/fs/aufs/i_op.c
> @@ -636,7 +636,11 @@ int au_pin_hdir_relock(struct au_pin *p)
>  
>  static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task)
>  {
> +#if IS_ENABLED(CONFIG_PREEMPT_RT)
> +     p->hdir->hi_inode->i_rwsem.rwbase.rtmutex.owner = task;
> +#else
>       atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
> +#endif
>  }
>  
>  void au_pin_hdir_acquire_nest(struct au_pin *p)
> -- 
> 2.35.5
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13467): 
https://lists.yoctoproject.org/g/linux-yocto/message/13467
Mute This Topic: https://lists.yoctoproject.org/mt/103540615/21656
Group Owner: [email protected]
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to