Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333224
b: refs/heads/master
c: af28388
h: refs/heads/master
v: v3
  • Loading branch information
Peng Tao authored and Trond Myklebust committed Oct 8, 2012
1 parent a493d3c commit ec738a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 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: 1fd937bd7583e618df0528f0268b210f265d6910
refs/heads/master: af283885b70248268617955a5ea5476647bd556b
1 change: 0 additions & 1 deletion trunk/fs/nfs/blocklayout/blocklayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ struct bl_msg_hdr {
/* blocklayoutdev.c */
ssize_t bl_pipe_downcall(struct file *, const char __user *, size_t);
void bl_pipe_destroy_msg(struct rpc_pipe_msg *);
struct block_device *nfs4_blkdev_get(dev_t dev);
int nfs4_blkdev_put(struct block_device *bdev);
struct pnfs_block_dev *nfs4_blk_decode_device(struct nfs_server *server,
struct pnfs_device *dev);
Expand Down
25 changes: 5 additions & 20 deletions trunk/fs/nfs/blocklayout/blocklayoutdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,6 @@ static int decode_sector_number(__be32 **rp, sector_t *sp)
return 0;
}

/* Open a block_device by device number. */
struct block_device *nfs4_blkdev_get(dev_t dev)
{
struct block_device *bd;

dprintk("%s enter\n", __func__);
bd = blkdev_get_by_dev(dev, FMODE_READ, NULL);
if (IS_ERR(bd))
goto fail;
return bd;
fail:
dprintk("%s failed to open device : %ld\n",
__func__, PTR_ERR(bd));
return NULL;
}

/*
* Release the block device
*/
Expand Down Expand Up @@ -172,11 +156,12 @@ nfs4_blk_decode_device(struct nfs_server *server,
goto out;
}

bd = nfs4_blkdev_get(MKDEV(reply->major, reply->minor));
bd = blkdev_get_by_dev(MKDEV(reply->major, reply->minor),
FMODE_READ, NULL);
if (IS_ERR(bd)) {
rc = PTR_ERR(bd);
dprintk("%s failed to open device : %d\n", __func__, rc);
rv = ERR_PTR(rc);
dprintk("%s failed to open device : %ld\n", __func__,
PTR_ERR(bd));
rv = ERR_CAST(bd);
goto out;
}

Expand Down

0 comments on commit ec738a8

Please sign in to comment.