Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119724
b: refs/heads/master
c: ebbefc0
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Dec 4, 2008
1 parent c42e534 commit 8e54a35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 1c925604e1038c7c65b91a92d14dc972b3a70a97
refs/heads/master: ebbefc011e56bd85b4745d01e5b8d7d05d95ed5d
11 changes: 7 additions & 4 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,12 +1135,15 @@ static int blkdev_open(struct inode * inode, struct file * filp)
if (res)
return res;

if (!(filp->f_mode & FMODE_EXCL))
return 0;
if (filp->f_mode & FMODE_EXCL) {
res = bd_claim(bdev, filp);
if (res)
goto out_blkdev_put;
}

if (!(res = bd_claim(bdev, filp)))
return 0;
return 0;

out_blkdev_put:
blkdev_put(bdev, filp->f_mode);
return res;
}
Expand Down

0 comments on commit 8e54a35

Please sign in to comment.