diff --git a/document-portal/document-portal-fuse.c b/document-portal/document-portal-fuse.c index 19ba4701a..dc4bd5fdb 100644 --- a/document-portal/document-portal-fuse.c +++ b/document-portal/document-portal-fuse.c @@ -3130,10 +3130,16 @@ xdp_fuse_setlk (fuse_req_t req, int sleep) { const char *op = "SETLK"; + XdpFile *file = (XdpFile *)fi->fh; + int res; g_debug ("SETLK %lx", ino); - xdp_reply_err (op, req, ENOSYS); + res = fcntl (file->fd, F_SETLK, lock); + if (res == 0) + return xdp_reply_err (op, req, 0); + else + return xdp_reply_err (op, req, errno); } static void