scst_vdisk: Fix a kernel 2.6.27 compiler warning

Avoid that the compiler reports that variables 'start_sector' and 'nr_sects'
are set but not used when building against kernel 2.6.27.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-04-17 06:12:07 +00:00
parent 8cac62f57e
commit 952a5a74ba

View File

@@ -2636,9 +2636,9 @@ static int vdisk_unmap_range(struct scst_cmd *cmd,
(unsigned long long)start_lba, (unsigned long long)blocks);
if (virt_dev->blockio) {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27)
sector_t start_sector = start_lba << (cmd->dev->block_shift - 9);
sector_t nr_sects = blocks << (cmd->dev->block_shift - 9);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27)
struct inode *inode = fd->f_dentry->d_inode;
gfp_t gfp = cmd->cmd_gfp_mask;
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31)