Fix splice_read
authorMiklos Szeredi <mszeredi@suse.cz>
Thu, 19 May 2011 13:09:43 +0000 (15:09 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 19 May 2011 13:09:43 +0000 (15:09 +0200)
include/fuse_common.h
lib/fuse_lowlevel.c

index 569c826aebc1a8f18d1b946f7bfe82bddbacafaf..0c4c1d416928966a97d830f48a10c8995df564c9 100644 (file)
@@ -92,6 +92,7 @@ struct fuse_file_info {
  * FUSE_CAP_DONT_MASK: don't apply umask to file mode on create operations
  * FUSE_CAP_SPLICE_WRITE: ability to use splice() to write to the fuse device
  * FUSE_CAP_SPLICE_MOVE: ability to move data to the fuse device with splice()
+ * FUSE_CAP_SPLICE_READ: ability to use splice() to read from the fuse device
  */
 #define FUSE_CAP_ASYNC_READ    (1 << 0)
 #define FUSE_CAP_POSIX_LOCKS   (1 << 1)
index 1715e2e1190d361fd0a75a8921f0965ff90a5634..55bce2bd603e7adf91cf620ca810242f914b580a 100644 (file)
@@ -1601,8 +1601,7 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
                        f->conn.want |= FUSE_CAP_SPLICE_WRITE;
                if (f->splice_move)
                        f->conn.want |= FUSE_CAP_SPLICE_MOVE;
-               if (f->splice_read &&
-                   (f->op.write_buf || f->op.retrieve_reply))
+               if (f->splice_read)
                        f->conn.want |= FUSE_CAP_SPLICE_READ;
        }