diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 16 | ||||
-rw-r--r-- | lib/fuse_i.h | 5 | ||||
-rw-r--r-- | lib/fuse_lowlevel.c | 9 |
3 files changed, 3 insertions, 27 deletions
@@ -2563,25 +2563,11 @@ void fuse_fs_init(struct fuse_fs *fs, struct fuse_conn_info *conn, if (fs->op.init) { uint64_t want_ext_default = conn->want_ext; uint32_t want_default = fuse_lower_32_bits(conn->want_ext); - int rc; conn->want = want_default; fs->user_data = fs->op.init(conn, cfg); - rc = convert_to_conn_want_ext(conn, want_ext_default, - want_default); - - if (rc != 0) { - /* - * This is a grave developer error, but - * we cannot return an error here, as the function - * signature does not allow it. - */ - fuse_log( - FUSE_LOG_ERR, - "fuse: Aborting due to invalid conn want flags.\n"); - _exit(EXIT_FAILURE); - } + convert_to_conn_want_ext(conn, want_ext_default, want_default); } } diff --git a/lib/fuse_i.h b/lib/fuse_i.h index 23e58ef..14d99ad 100644 --- a/lib/fuse_i.h +++ b/lib/fuse_i.h @@ -268,11 +268,8 @@ static inline int convert_to_conn_want_ext(struct fuse_conn_info *conn, */ if (conn->want != want_default && fuse_lower_32_bits(conn->want_ext) != conn->want) { - if (conn->want_ext != want_ext_default) { - fuse_log(FUSE_LOG_ERR, - "fuse: both 'want' and 'want_ext' are set\n"); + if (conn->want_ext != want_ext_default) return -EINVAL; - } /* high bits from want_ext, low bits from want */ conn->want_ext = fuse_higher_32_bits(conn->want_ext) | diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 619edfc..9fb793b 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2605,7 +2605,6 @@ _do_init(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in, if (se->op.init) { uint64_t want_ext_default = se->conn.want_ext; uint32_t want_default = fuse_lower_32_bits(se->conn.want_ext); - int rc; // Apply the first 32 bits of capable_ext to capable se->conn.capable = fuse_lower_32_bits(se->conn.capable_ext); @@ -2618,14 +2617,8 @@ _do_init(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in, * se->conn.want_ext * Userspace might still use conn.want - we need to convert it */ - rc = convert_to_conn_want_ext(&se->conn, want_ext_default, + convert_to_conn_want_ext(&se->conn, want_ext_default, want_default); - if (rc != 0) { - fuse_reply_err(req, EPROTO); - se->error = -EPROTO; - fuse_session_exit(se); - return; - } } if (!want_flags_valid(se->conn.capable_ext, se->conn.want_ext)) { |