In sparse mode we just read or write to a sparse file not a block device so no need to check device mount state in sparse mode.
Signed-off-by: zhangxirui <xirui.zh...@vivo.com> --- lib/libf2fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libf2fs.c b/lib/libf2fs.c index 2451201..5315de2 100644 --- a/lib/libf2fs.c +++ b/lib/libf2fs.c @@ -830,6 +830,10 @@ int f2fs_devs_are_umounted(void) { int i; + /*no need to check device mount state in sparse mode*/ + if (c.sparse_mode) + return 0; + for (i = 0; i < c.ndevs; i++) if (f2fs_dev_is_umounted((char *)c.devices[i].path)) return -1; -- 2.25.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel