From ed20cbf0cd4b72bbeed409d53155c405a1147d01 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Apr 16 2021 22:13:56 +0000 Subject: Apply patch autofs-5.1.4-use-defines-for-expire-type.patch patch_name: autofs-5.1.4-use-defines-for-expire-type.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index e9c7a59..d3c8c72 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -111,6 +111,7 @@ xx/xx/2018 autofs-5.1.5 - use a valid timeout in lookup_prune_one_cache(). - dont prune offset map entries. - simplify sss source stale check. +- use defines for expire type. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/daemon/state.c b/daemon/state.c index c6fe069..6e15da3 100644 --- a/daemon/state.c +++ b/daemon/state.c @@ -634,7 +634,7 @@ static unsigned int st_prepare_shutdown(struct autofs_point *ap) ap->state = ST_SHUTDOWN_PENDING; /* Unmount everything */ - exp = expire_proc(ap, 1); + exp = expire_proc(ap, AUTOFS_EXP_IMMEDIATE); switch (exp) { case EXP_ERROR: case EXP_PARTIAL: @@ -660,7 +660,7 @@ static unsigned int st_force_shutdown(struct autofs_point *ap) ap->state = ST_SHUTDOWN_FORCE; /* Unmount everything */ - exp = expire_proc(ap, 1); + exp = expire_proc(ap, AUTOFS_EXP_FORCE | AUTOFS_EXP_IMMEDIATE); switch (exp) { case EXP_ERROR: case EXP_PARTIAL: @@ -695,7 +695,7 @@ static unsigned int st_prune(struct autofs_point *ap) assert(ap->state == ST_READY); ap->state = ST_PRUNE; - switch (expire_proc(ap, 1)) { + switch (expire_proc(ap, AUTOFS_EXP_IMMEDIATE)) { case EXP_ERROR: case EXP_PARTIAL: if (!ap->submount) @@ -716,7 +716,7 @@ static unsigned int st_expire(struct autofs_point *ap) assert(ap->state == ST_READY); ap->state = ST_EXPIRE; - switch (expire_proc(ap, 0)) { + switch (expire_proc(ap, AUTOFS_EXP_NORMAL)) { case EXP_ERROR: case EXP_PARTIAL: if (!ap->submount) diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index e02982f..9196e7b 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h @@ -27,8 +27,10 @@ #define AUTOFS_PROTO_SUBVERSION 2 /* Mask for expire behaviour */ -#define AUTOFS_EXP_IMMEDIATE 1 -#define AUTOFS_EXP_LEAVES 2 +#define AUTOFS_EXP_NORMAL 0x00 +#define AUTOFS_EXP_IMMEDIATE 0x01 +#define AUTOFS_EXP_LEAVES 0x02 +#define AUTOFS_EXP_FORCE 0x04 #define AUTOFS_TYPE_ANY 0U #define AUTOFS_TYPE_INDIRECT 1U diff --git a/include/state.h b/include/state.h index e3079c2..98f27d3 100644 --- a/include/state.h +++ b/include/state.h @@ -55,7 +55,7 @@ struct expire_args { unsigned int signaled; struct autofs_point *ap; /* autofs mount we are working on */ enum states state; /* State prune or expire */ - unsigned int how; /* Normal, immediate expire ? */ + unsigned int how; /* Normal, immediate, forced expire ? */ int status; /* Return status */ };