On Fri, 2025-07-25 at 23:58 -0400, Benjamin Marzinski wrote:
> Otherwise this request will create a useless prkeys file.
> 
> Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com>
> ---
>  libmpathpersist/mpath_persist_int.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libmpathpersist/mpath_persist_int.c
> b/libmpathpersist/mpath_persist_int.c
> index dfdadab6..f901b955 100644
> --- a/libmpathpersist/mpath_persist_int.c
> +++ b/libmpathpersist/mpath_persist_int.c
> @@ -831,7 +831,8 @@ int do_mpath_persistent_reserve_out(vector curmp,
> vector pathvec, int fd,
>               break;
>       case MPATH_PROUT_CLEAR_SA:
>               update_prflag(mpp->alias, 0);
> -             update_prkey(mpp->alias, 0);
> +             if (mpp->prkey_source == PRKEY_SOURCE_FILE)
> +                     update_prkey(mpp->alias, 0);

Should this condition be checked in update_prkey_flags() directly?

Martin

Reply via email to