mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
pseries/papr-hvpipe: Simplify spin unlock usage in papr_hvpipe_handle_release()
Once the src_info is removed from the global list, no one can access it. This simplies the usage of spin_unlock_irqrestore() in papr_hvpipe_handle_release() Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/4a980331557af3d10aada8576aaa16cddc691c65.1777606826.git.ritesh.list@gmail.com
This commit is contained in:
parent
d48654bd8b
commit
2eeac57748
|
|
@ -460,6 +460,7 @@ static int papr_hvpipe_handle_release(struct inode *inode,
|
|||
src_info = file->private_data;
|
||||
list_del(&src_info->list);
|
||||
file->private_data = NULL;
|
||||
spin_unlock_irqrestore(&hvpipe_src_list_lock, flags);
|
||||
/*
|
||||
* If the pipe for this specific source has any pending
|
||||
* payload, issue recv HVPIPE RTAS so that pipe will not
|
||||
|
|
@ -467,10 +468,8 @@ static int papr_hvpipe_handle_release(struct inode *inode,
|
|||
*/
|
||||
if (src_info->hvpipe_status & HVPIPE_MSG_AVAILABLE) {
|
||||
src_info->hvpipe_status = 0;
|
||||
spin_unlock_irqrestore(&hvpipe_src_list_lock, flags);
|
||||
hvpipe_rtas_recv_msg(NULL, 0);
|
||||
} else
|
||||
spin_unlock_irqrestore(&hvpipe_src_list_lock, flags);
|
||||
}
|
||||
|
||||
kfree(src_info);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user