aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index a75fe93a25b1..5ab9f55d3e0c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1684,7 +1684,9 @@ static int rbd_header_add_snap(struct rbd_device *dev,
1684 if (ret < 0) 1684 if (ret < 0)
1685 return ret; 1685 return ret;
1686 1686
1687 dev->header.snapc->seq = new_snapid; 1687 down_write(&dev->header_rwsem);
1688 dev->header.snapc->seq = new_snapid;
1689 up_write(&dev->header_rwsem);
1688 1690
1689 return 0; 1691 return 0;
1690bad: 1692bad: