Displaying 2 results from an estimated 2 matches for "put_filp".
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...< 0) {
+ err = fd;
+ goto out;
+ }
+
+ filp = alloc_file(vring_mnt, dget(vring_mnt->mnt_root), FMODE_WRITE,
+ &vring_fops);
+ if (!filp) {
+ err = -ENFILE;
+ goto put_fd;
+ }
+
+ filp->private_data = vr = kmalloc(sizeof(*vr), GFP_KERNEL);
+ if (!vr) {
+ err = -ENOMEM;
+ goto put_filp;
+ }
+
+ /* Set up pointers into ring. */
+ vring_init(&vr->ring, num_descs, addr, PAGE_SIZE);
+ init_waitqueue_head(&vr->poll_wait);
+ vr->last_used = last_used;
+ vr->mask = num_descs - 1;
+ vr->ops = NULL;
+ vr->used = NULL;
+
+ err = get_user(vr->last_avail, &vr...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...< 0) {
+ err = fd;
+ goto out;
+ }
+
+ filp = alloc_file(vring_mnt, dget(vring_mnt->mnt_root), FMODE_WRITE,
+ &vring_fops);
+ if (!filp) {
+ err = -ENFILE;
+ goto put_fd;
+ }
+
+ filp->private_data = vr = kmalloc(sizeof(*vr), GFP_KERNEL);
+ if (!vr) {
+ err = -ENOMEM;
+ goto put_filp;
+ }
+
+ /* Set up pointers into ring. */
+ vring_init(&vr->ring, num_descs, addr, PAGE_SIZE);
+ init_waitqueue_head(&vr->poll_wait);
+ vr->last_used = last_used;
+ vr->mask = num_descs - 1;
+ vr->ops = NULL;
+ vr->used = NULL;
+
+ err = get_user(vr->last_avail, &vr...