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); 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 (#13454): https://lists.yoctoproject.org/g/linux-yocto/message/13454 Mute This Topic: https://lists.yoctoproject.org/mt/103540615/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
