Displaying 9 results from an estimated 9 matches for "blk_integrity_add".
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
..., struct gendisk *disk)
>
> retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> "bdi");
> + if (retval)
> + goto fail;
> +
> + retval = disk_add_events(disk);
> + if (retval)
> + goto fail;
> +
> + retval = blk_integrity_add(disk);
> + if (retval)
> + goto fail;
> + return 0;
> +fail:
> WARN_ON(retval);
> -
> - disk_add_events(disk);
> - blk_integrity_add(disk);
> + return retval;
> }
Noticed this when trying to figure out whether the error handling in
virtio_blk was correct:
Shouldn...
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
..., struct gendisk *disk)
>
> retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> "bdi");
> + if (retval)
> + goto fail;
> +
> + retval = disk_add_events(disk);
> + if (retval)
> + goto fail;
> +
> + retval = blk_integrity_add(disk);
> + if (retval)
> + goto fail;
> + return 0;
> +fail:
> WARN_ON(retval);
> -
> - disk_add_events(disk);
> - blk_integrity_add(disk);
> + return retval;
> }
Noticed this when trying to figure out whether the error handling in
virtio_blk was correct:
Shouldn...
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
...;kobj, &bdi->dev->kobj,
> > > "bdi");
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = disk_add_events(disk);
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = blk_integrity_add(disk);
> > > + if (retval)
> > > + goto fail;
> > > + return 0;
> > > +fail:
> > > WARN_ON(retval);
> > > -
> > > - disk_add_events(disk);
> > > - blk_integrity_add(disk);
> > > + return retval;
> > > }
&g...
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
...;kobj, &bdi->dev->kobj,
> > > "bdi");
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = disk_add_events(disk);
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = blk_integrity_add(disk);
> > > + if (retval)
> > > + goto fail;
> > > + return 0;
> > > +fail:
> > > WARN_ON(retval);
> > > -
> > > - disk_add_events(disk);
> > > - blk_integrity_add(disk);
> > > + return retval;
> > > }
&g...
2016 Aug 17
0
[PATCH 06/15] genhd: Add return code to device_add_disk
...sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> > "bdi");
> > + if (retval)
> > + goto fail;
> > +
> > + retval = disk_add_events(disk);
> > + if (retval)
> > + goto fail;
> > +
> > + retval = blk_integrity_add(disk);
> > + if (retval)
> > + goto fail;
> > + return 0;
> > +fail:
> > WARN_ON(retval);
> > -
> > - disk_add_events(disk);
> > - blk_integrity_add(disk);
> > + return retval;
> > }
>
> Noticed this when trying to figure out wh...
2016 Aug 17
0
[PATCH 06/15] genhd: Add return code to device_add_disk
...+653,20 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
"bdi");
+ if (retval)
+ goto fail;
+
+ retval = disk_add_events(disk);
+ if (retval)
+ goto fail;
+
+ retval = blk_integrity_add(disk);
+ if (retval)
+ goto fail;
+ return 0;
+fail:
WARN_ON(retval);
-
- disk_add_events(disk);
- blk_integrity_add(disk);
+ return retval;
}
EXPORT_SYMBOL(device_add_disk);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 85ce560..991b5ff 100644
--- a/include/linux/genhd.h...
2016 Aug 17
0
[PATCH 06/15] genhd: Add return code to device_add_disk
...gt; > "bdi");
> > > > + if (retval)
> > > > + goto fail;
> > > > +
> > > > + retval = disk_add_events(disk);
> > > > + if (retval)
> > > > + goto fail;
> > > > +
> > > > + retval = blk_integrity_add(disk);
> > > > + if (retval)
> > > > + goto fail;
> > > > + return 0;
> > > > +fail:
> > > > WARN_ON(retval);
> > > > -
> > > > - disk_add_events(disk);
> > > > - blk_integrity_add(disk);
> > &g...
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
...re KOBJ_ADD.
Also add basic error handling around device_add_disk code, (or add FIXME
comment where work is left).
Fam Zheng (15):
disk: Drop add_disk in favor of device_add_disk
genhd: Return error from register_disk()
genhd: Return error from blk_register_region
block: Return error from blk_integrity_add
genhd: Return error from disk_{add,alloc}_events
genhd: Add return code to device_add_disk
genhd: Add attribute group parameter to device_add_disk
nvme: Pass attribute group to device_add_disk
virtio-blk: Pass attribute group to device_add_disk
mtd: Pass attribute group to device_add_di...
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
...re KOBJ_ADD.
Also add basic error handling around device_add_disk code, (or add FIXME
comment where work is left).
Fam Zheng (15):
disk: Drop add_disk in favor of device_add_disk
genhd: Return error from register_disk()
genhd: Return error from blk_register_region
block: Return error from blk_integrity_add
genhd: Return error from disk_{add,alloc}_events
genhd: Add return code to device_add_disk
genhd: Add attribute group parameter to device_add_disk
nvme: Pass attribute group to device_add_disk
virtio-blk: Pass attribute group to device_add_disk
mtd: Pass attribute group to device_add_di...