Message ID | 20221221075821.3786392-1-jencce.kernel@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | statx07: umount before un-export | expand |
Hello, Murphy Zhou <jencce.kernel@gmail.com> writes: > We need to umount first, or there will be an umounted mountpoint > left behind. Merged, thanks! > > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> > --- > testcases/kernel/syscalls/statx/statx07.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c > index e1ae36a35..8cb3e9b6d 100644 > --- a/testcases/kernel/syscalls/statx/statx07.c > +++ b/testcases/kernel/syscalls/statx/statx07.c > @@ -149,6 +149,9 @@ static void setup(void) > > static void cleanup(void) > { > + if (mounted) > + SAFE_UMOUNT(CLI_PATH); > + > if (!exported) > return; > snprintf(cmd, sizeof(cmd), > @@ -156,9 +159,6 @@ static void cleanup(void) > > if (tst_system(cmd) == -1) > tst_res(TWARN | TST_ERR, "failed to clear exportfs"); > - > - if (mounted) > - SAFE_UMOUNT(CLI_PATH); > } > > static struct tst_test test = { > -- > 2.31.1
diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c index e1ae36a35..8cb3e9b6d 100644 --- a/testcases/kernel/syscalls/statx/statx07.c +++ b/testcases/kernel/syscalls/statx/statx07.c @@ -149,6 +149,9 @@ static void setup(void) static void cleanup(void) { + if (mounted) + SAFE_UMOUNT(CLI_PATH); + if (!exported) return; snprintf(cmd, sizeof(cmd), @@ -156,9 +159,6 @@ static void cleanup(void) if (tst_system(cmd) == -1) tst_res(TWARN | TST_ERR, "failed to clear exportfs"); - - if (mounted) - SAFE_UMOUNT(CLI_PATH); } static struct tst_test test = {
We need to umount first, or there will be an umounted mountpoint left behind. Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com> --- testcases/kernel/syscalls/statx/statx07.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)