block: fix locking for struct block_device size updates
[linux-2.6-microblaze.git] / drivers / block / aoe / aoecmd.c
index 3cf9bc5..313f0b9 100644 (file)
@@ -900,9 +900,7 @@ aoecmd_sleepwork(struct work_struct *work)
                ssize = get_capacity(d->gd);
                bd = bdget_disk(d->gd, 0);
                if (bd) {
-                       inode_lock(bd->bd_inode);
-                       i_size_write(bd->bd_inode, (loff_t)ssize<<9);
-                       inode_unlock(bd->bd_inode);
+                       bd_set_nr_sectors(bd, ssize);
                        bdput(bd);
                }
                spin_lock_irq(&d->lock);
@@ -1135,7 +1133,7 @@ noskb:            if (buf)
                        break;
                }
                bvcpy(skb, f->buf->bio, f->iter, n);
-               /* fall through */
+               fallthrough;
        case ATA_CMD_PIO_WRITE:
        case ATA_CMD_PIO_WRITE_EXT:
                spin_lock_irq(&d->lock);