Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263132
b: refs/heads/master
c: 05eb0f2
h: refs/heads/master
v: v3
  • Loading branch information
Kay Sievers authored and Jens Axboe committed Jul 31, 2011
1 parent 0cf3d80 commit 650c552
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d134b00b9acca3fb054d7c88a5f5d562ecbb42d1
refs/heads/master: 05eb0f252b04aa94ace0794f73d56c6a02351d80
6 changes: 4 additions & 2 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,10 @@ static ssize_t loop_attr_backing_file_show(struct loop_device *lo, char *buf)
ssize_t ret;
char *p = NULL;

mutex_lock(&lo->lo_ctl_mutex);
spin_lock_irq(&lo->lo_lock);
if (lo->lo_backing_file)
p = d_path(&lo->lo_backing_file->f_path, buf, PAGE_SIZE - 1);
mutex_unlock(&lo->lo_ctl_mutex);
spin_unlock_irq(&lo->lo_lock);

if (IS_ERR_OR_NULL(p))
ret = PTR_ERR(p);
Expand Down Expand Up @@ -1000,7 +1000,9 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)

kthread_stop(lo->lo_thread);

spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = NULL;
spin_unlock_irq(&lo->lo_lock);

loop_release_xfer(lo);
lo->transfer = NULL;
Expand Down

0 comments on commit 650c552

Please sign in to comment.