diff options
-rw-r--r-- | drivers/md/dm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f48a2f359ac4..4ef066a3090f 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1992,13 +1992,14 @@ static void event_callback(void *context) | |||
1992 | wake_up(&md->eventq); | 1992 | wake_up(&md->eventq); |
1993 | } | 1993 | } |
1994 | 1994 | ||
1995 | /* | ||
1996 | * Protected by md->suspend_lock obtained by dm_swap_table(). | ||
1997 | */ | ||
1995 | static void __set_size(struct mapped_device *md, sector_t size) | 1998 | static void __set_size(struct mapped_device *md, sector_t size) |
1996 | { | 1999 | { |
1997 | set_capacity(md->disk, size); | 2000 | set_capacity(md->disk, size); |
1998 | 2001 | ||
1999 | mutex_lock(&md->bdev->bd_inode->i_mutex); | ||
2000 | i_size_write(md->bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); | 2002 | i_size_write(md->bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); |
2001 | mutex_unlock(&md->bdev->bd_inode->i_mutex); | ||
2002 | } | 2003 | } |
2003 | 2004 | ||
2004 | /* | 2005 | /* |