lib ring buffer frontend: add missing lock initialization
[lttng-modules.git] / lib / ringbuffer / ring_buffer_vfs.c
index 9786d353cba185b696cddf61f7238bfea22443f7..1708ffd6bc9b1b80f06da11af5cb7830c2a6923b 100644 (file)
@@ -245,6 +245,9 @@ long lib_ring_buffer_ioctl(struct file *filp, unsigned int cmd, unsigned long ar
                return put_ulong(buf->backend.array[sb_bindex]->mmap_offset,
                                 arg);
        }
+       case RING_BUFFER_FLUSH:
+               lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+               return 0;
        default:
                return -ENOIOCTLCMD;
        }
@@ -355,6 +358,9 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                        return -EINVAL;
                return put_ulong(read_offset, arg);
        }
+       case RING_BUFFER_FLUSH:
+               lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+               return 0;
        default:
                return -ENOIOCTLCMD;
        }
@@ -362,6 +368,7 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
 #endif
 
 const struct file_operations lib_ring_buffer_file_operations = {
+       .owner = THIS_MODULE,
        .open = lib_ring_buffer_open,
        .release = lib_ring_buffer_release,
        .poll = lib_ring_buffer_poll,
This page took 0.023592 seconds and 4 git commands to generate.