Fix: metadata stream should not reference session
[lttng-modules.git] / lib / ringbuffer / ring_buffer_vfs.c
index 33dfeaaaba4c5ce55df34ac97b9b812f78d8f565..dae73de398c5ea38dba90f0bd384d5f21f327d30 100644 (file)
@@ -41,6 +41,10 @@ static int compat_put_ulong(compat_ulong_t val, unsigned long arg)
 }
 #endif
 
+/*
+ * This is not used by anonymous file descriptors. This code is left
+ * there if we ever want to implement an inode with open() operation.
+ */
 int lib_ring_buffer_open(struct inode *inode, struct file *file,
                struct lib_ring_buffer *buf)
 {
@@ -263,7 +267,7 @@ long lib_ring_buffer_ioctl(struct file *filp, unsigned int cmd,
                                 arg);
        }
        case RING_BUFFER_FLUSH:
-               lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+               lib_ring_buffer_switch_remote(buf);
                return 0;
        default:
                return -ENOIOCTLCMD;
@@ -408,7 +412,7 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                return compat_put_ulong(read_offset, arg);
        }
        case RING_BUFFER_COMPAT_FLUSH:
-               lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+               lib_ring_buffer_switch_remote(buf);
                return 0;
        default:
                return -ENOIOCTLCMD;
This page took 0.030643 seconds and 4 git commands to generate.