diff --git a/cloud/filestore/libs/vfs_fuse/fuse.h b/cloud/filestore/libs/vfs_fuse/fuse.h index c3d1bbf8ec2..6b857227af0 100644 --- a/cloud/filestore/libs/vfs_fuse/fuse.h +++ b/cloud/filestore/libs/vfs_fuse/fuse.h @@ -24,6 +24,8 @@ void fuse_session_setparams( struct fuse_session* se, const struct fuse_session_params* params); +void fuse_session_initparams(struct fuse_session* se); + void fuse_session_getparams( struct fuse_session* se, struct fuse_session_params* params); diff --git a/cloud/filestore/libs/vfs_fuse/loop.cpp b/cloud/filestore/libs/vfs_fuse/loop.cpp index be7a70994db..3a57733f907 100644 --- a/cloud/filestore/libs/vfs_fuse/loop.cpp +++ b/cloud/filestore/libs/vfs_fuse/loop.cpp @@ -277,6 +277,8 @@ class TSession { NProto::TVfsSessionState proto; if (!state || !proto.ParseFromString(state)) { + fuse_session_initparams(Session); + return; } diff --git a/cloud/filestore/libs/vfs_fuse/vhost/fuse_virtio.c b/cloud/filestore/libs/vfs_fuse/vhost/fuse_virtio.c index b974d805d4e..0661276d121 100644 --- a/cloud/filestore/libs/vfs_fuse/vhost/fuse_virtio.c +++ b/cloud/filestore/libs/vfs_fuse/vhost/fuse_virtio.c @@ -327,6 +327,18 @@ void fuse_session_setparams( se->got_destroy = 0; } +void fuse_session_initparams(struct fuse_session* se) +{ + se->conn.proto_major = 0; + se->conn.proto_minor = 0; + se->conn.capable = 0; + se->conn.want = 0; + se->bufsize = 0; + + se->got_init = 0; + se->got_destroy = 0; +} + void fuse_session_getparams( struct fuse_session* se, struct fuse_session_params* params)