diff options
author | Ed Cashin <ecashin@coraid.com> | 2012-10-05 02:16:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 20:05:27 +0200 |
commit | b21faa25c6d25a76c09f1e05a1b18ee2372e3841 (patch) | |
tree | 0a09a402dbfa7f2179a0921be004e53d19201053 /drivers/block/aoe/aoecmd.c | |
parent | aoe: increase net_device reference count while using it (diff) | |
download | linux-b21faa25c6d25a76c09f1e05a1b18ee2372e3841.tar.xz linux-b21faa25c6d25a76c09f1e05a1b18ee2372e3841.zip |
aoe: remove unused code and add cosmetic improvements
This change removes some unused code and attempts to increase code
consistency.
Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 2f19b9bba913..6d2a21458b50 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -284,7 +284,6 @@ aoecmd_ata_rw(struct aoedev *d) struct aoe_hdr *h; struct aoe_atahdr *ah; struct buf *buf; - struct bio_vec *bv; struct aoetgt *t; struct sk_buff *skb; struct sk_buff_head queue; @@ -301,7 +300,6 @@ aoecmd_ata_rw(struct aoedev *d) if (f == NULL) return 0; t = *d->tgt; - bv = buf->bv; bcnt = d->maxbcnt; if (bcnt == 0) bcnt = DEFAULTBCNT; @@ -788,28 +786,25 @@ void aoecmd_sleepwork(struct work_struct *work) { struct aoedev *d = container_of(work, struct aoedev, work); + struct block_device *bd; + u64 ssize; if (d->flags & DEVFL_GDALLOC) aoeblk_gdalloc(d); if (d->flags & DEVFL_NEWSIZE) { - struct block_device *bd; - unsigned long flags; - u64 ssize; - ssize = get_capacity(d->gd); bd = bdget_disk(d->gd, 0); - if (bd) { mutex_lock(&bd->bd_inode->i_mutex); i_size_write(bd->bd_inode, (loff_t)ssize<<9); mutex_unlock(&bd->bd_inode->i_mutex); bdput(bd); } - spin_lock_irqsave(&d->lock, flags); + spin_lock_irq(&d->lock); d->flags |= DEVFL_UP; d->flags &= ~DEVFL_NEWSIZE; - spin_unlock_irqrestore(&d->lock, flags); + spin_unlock_irq(&d->lock); } } |