]> git.baikalelectronics.ru Git - kernel.git/commit
pmem: make_request cleanups
authorDan Williams <dan.j.williams@intel.com>
Sat, 16 May 2015 16:28:51 +0000 (12:28 -0400)
committerDan Williams <dan.j.williams@intel.com>
Fri, 26 Jun 2015 15:23:38 +0000 (11:23 -0400)
commit8009b1460b84f0b1aa5e6c6526c1d6ffb1a78afb
tree0ee102885363e2ad30eb6f07900b5b8798f5e4ce
parenta483fbad33f9c7f6a13faf7a5d2c7d769e9af8d4
pmem: make_request cleanups

Various cleanups:

1/ Kill the BUG_ON since we've already told the block layer we don't
   support DISCARD on all these drivers.

2/ Kill the 'rw' variable, no need to cache it.

3/ Kill the local 'sector' variable.  bio_for_each_segment() is already
   advancing the iterator's sector number by the bio_vec length.

4/ Kill the check for accessing past the end of device
   generic_make_request_checks() already does that.

Suggested-by: Christoph Hellwig <hch@lst.de>
[hch: kill access past end of the device check]
Reviewed-by: Vishal Verma <vishal.l.verma@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pmem.c