diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 23:07:38 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-23 05:31:31 +0100 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /drivers/net/wan | |
parent | mount: consolidate permission checks (diff) | |
download | linux-496ad9aa8ef448058e36ca7a787c61f2e63f0f54.tar.xz linux-496ad9aa8ef448058e36ca7a787c61f2e63f0f54.zip |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/cosa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 6aed238e573e..1505509728aa 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -939,14 +939,14 @@ static int cosa_open(struct inode *inode, struct file *file) int ret = 0; mutex_lock(&cosa_chardev_mutex); - if ((n=iminor(file->f_path.dentry->d_inode)>>CARD_MINOR_BITS) + if ((n=iminor(file_inode(file))>>CARD_MINOR_BITS) >= nr_cards) { ret = -ENODEV; goto out; } cosa = cosa_cards+n; - if ((n=iminor(file->f_path.dentry->d_inode) + if ((n=iminor(file_inode(file)) & ((1<<CARD_MINOR_BITS)-1)) >= cosa->nchannels) { ret = -ENODEV; goto out; |