Skip to content

Commit 0f1bb73

Browse files
authored
fuse adaptor: bugfix: Fix function declaration order and header dependency (alibaba#1127)
This PR resolves two critical compilation issues in the FUSE adaptor session loop: 1. Fixed function declaration order for fuse_session_receive_splice overloads Moved the 3-argument overload definition after the 4-argument version in session_loop.cpp. Previously caused compilation failure: the 3-arg version called the undeclared 4-arg function (defined later in the file). No functional change C purely structural reorganization for correct declaration sequence. 2. Added missing header dependency Included <liburing.h> in session_loop.h .Ensures header self-containment for liburing-dependent types used by consumers of this header.Prevents potential "undefined type" errors in downstream compilation units.
1 parent 95ac01b commit 0f1bb73

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

fs/fuse_adaptor/session_loop.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ struct fuse_pipe {
108108
}
109109
};
110110

111-
int fuse_session_receive_splice(
112-
struct fuse_session *se,
113-
struct fuse_buf *buf,
114-
struct fuse_pipe *iopipe) {
115-
return fuse_session_receive_splice(se, buf, iopipe, fuse_session_fd(se));
116-
}
117-
118111
int fuse_session_receive_splice(
119112
struct fuse_session *se,
120113
struct fuse_buf *buf,
@@ -172,6 +165,13 @@ int fuse_session_receive_splice(
172165
return res;
173166
}
174167

168+
int fuse_session_receive_splice(
169+
struct fuse_session *se,
170+
struct fuse_buf *buf,
171+
struct fuse_pipe *iopipe) {
172+
return fuse_session_receive_splice(se, buf, iopipe, fuse_session_fd(se));
173+
}
174+
175175
int fuse_session_receive_fd(
176176
struct fuse_session *se,
177177
struct fuse_buf *buf,

fs/fuse_adaptor/session_loop.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ limitations under the License.
2626
#include <fuse.h>
2727
#endif
2828

29+
#include <liburing.h>
30+
2931
namespace photon {
3032
namespace fs {
3133

0 commit comments

Comments
 (0)