Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359400
b: refs/heads/master
c: a83e814
h: refs/heads/master
v: v3
  • Loading branch information
Paolo Bonzini authored and Linus Torvalds committed Feb 28, 2013
1 parent 9e0be15 commit f8ce152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a2d63f87989e01437ba994df5f297528c353d7d
refs/heads/master: a83e814b5bb948850e903585d18b6298b7093cb2
3 changes: 3 additions & 0 deletions trunk/drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,

mutex_unlock(&nbd->tx_lock);

if (nbd->flags & NBD_FLAG_READ_ONLY)
set_device_ro(bdev, true);
if (nbd->flags & NBD_FLAG_SEND_TRIM)
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD,
nbd->disk->queue);
Expand Down Expand Up @@ -730,6 +732,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
dev_warn(disk_to_dev(nbd->disk), "queue cleared\n");
kill_bdev(bdev);
queue_flag_clear_unlocked(QUEUE_FLAG_DISCARD, nbd->disk->queue);
set_device_ro(bdev, false);
if (file)
fput(file);
nbd->flags = 0;
Expand Down

0 comments on commit f8ce152

Please sign in to comment.