diff options
author | Brian Behlendorf <[email protected]> | 2010-11-10 16:38:14 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-11-10 17:00:40 -0800 |
commit | 8326eb4605a3d7c87cac15d5d11316fb99cd9ab0 (patch) | |
tree | 1ba02088aa9d351fb50243353cfa12df15b3deca /include | |
parent | 675de5aa379bfceb0258a20c4ccd1414e4798ee6 (diff) |
Linux 2.6.36 compat, blk_* macros removed
Most of the blk_* macros were removed in 2.6.36. Ostensibly this was
done to improve readability and allow easier grepping. However, from
a portability stand point the macros are helpful. Therefore the needed
macros are redefined here if they are missing from the kernel.
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/blkdev.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sys/blkdev.h b/include/sys/blkdev.h index 3dc0fd2a8..7f242202a 100644 --- a/include/sys/blkdev.h +++ b/include/sys/blkdev.h @@ -163,6 +163,16 @@ __blk_rq_bytes(struct request *req) } #endif /* !HAVE_BLK_RQ_BYTES || HAVE_BLK_RQ_BYTES_GPL_ONLY */ +/* + * Most of the blk_* macros were removed in 2.6.36. Ostensibly this was + * done to improve readability and allow easier grepping. However, from + * a portability stand point the macros are helpful. Therefore the needed + * macros are redefined here if they are missing from the kernel. + */ +#ifndef blk_fs_request +#define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS) +#endif + #ifndef HAVE_GET_DISK_RO static inline int get_disk_ro(struct gendisk *disk) |