[Devel] [PATCH RH8] fuse: fix fs context

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jul 22 13:59:34 MSK 2021


"source" option is parsed before all others.
So, during OPT_SOURCE parse disable_close_wait is never set.

int do_new_mount()
{
       vfs_parse_fs_string(fc, "source", name, strlen(name));
       parse_monolithic_mount_data(fc, data);
}

https://jira.sw.ru/browse/PSBM-131961

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/inode.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 218f9e43c279..81308d08a8ad 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -695,9 +695,7 @@ static int fuse_parse_param(struct fs_context *fc, struct fs_parameter *param)
 		if (fc->source &&
 		    (strncmp(fc->source, "pstorage://", 11) == 0 ||
 		     strncmp(fc->source, "vstorage://", 11) == 0)) {
-			if (!ctx->disable_close_wait)
-				ctx->close_wait = 1;
-
+			ctx->close_wait = 1;
 			ctx->compat_inval_files = 1;
 		} else
 			ctx->no_fiemap = 1;
@@ -775,6 +773,7 @@ static int fuse_parse_param(struct fs_context *fc, struct fs_parameter *param)
 
 	case OPT_DISABLE_CLOSE_WAIT:
 		ctx->disable_close_wait = 1;
+		ctx->close_wait = 0;
 		break;
 
 	case OPT_KIO_NAME: {




More information about the Devel mailing list