diff options
author | Martin Wilck <mwilck@suse.com> | 2019-03-27 14:51:05 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-12 13:35:28 -0600 |
commit | cdf3e3deb747d5e193dee617ed37c83060eb576f (patch) | |
tree | c93a8bd77329c69d7843058071ef5c78160efc58 /lib/crc16.c | |
parent | 773008f6fe0544aa28140ced0504cefba17381aa (diff) | |
download | linux-cdf3e3deb747d5e193dee617ed37c83060eb576f.tar.bz2 |
block: check_events: don't bother with events if unsupported
Drivers now report to the block layer if they support media change
events. If this is not the case, there's no need to allocate the event
structure, and all event handling code can effectively be skipped. This
simplifies code flow in particular for non-removable sd devices.
This effectively reverts commit 75e3f3ee3c64 ("block: always allocate
genhd->ev if check_events is implemented").
The sysfs files for the events are kept in place even if no events are
supported, as user space may rely on them being present. The only
difference is that an error code is now returned if the user tries to
set poll_msecs.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/crc16.c')
0 files changed, 0 insertions, 0 deletions