diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/ncpfs | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ncpfs')
-rw-r--r-- | fs/ncpfs/inode.c | 4 | ||||
-rw-r--r-- | fs/ncpfs/ioctl.c | 2 | ||||
-rw-r--r-- | fs/ncpfs/mmap.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 1acdad7fcec7..c41e02932542 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
@@ -525,7 +525,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
525 | if (!ncp_filp) | 525 | if (!ncp_filp) |
526 | goto out; | 526 | goto out; |
527 | error = -ENOTSOCK; | 527 | error = -ENOTSOCK; |
528 | sock_inode = ncp_filp->f_path.dentry->d_inode; | 528 | sock_inode = file_inode(ncp_filp); |
529 | if (!S_ISSOCK(sock_inode->i_mode)) | 529 | if (!S_ISSOCK(sock_inode->i_mode)) |
530 | goto out_fput; | 530 | goto out_fput; |
531 | sock = SOCKET_I(sock_inode); | 531 | sock = SOCKET_I(sock_inode); |
@@ -564,7 +564,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
564 | if (!server->info_filp) | 564 | if (!server->info_filp) |
565 | goto out_bdi; | 565 | goto out_bdi; |
566 | error = -ENOTSOCK; | 566 | error = -ENOTSOCK; |
567 | sock_inode = server->info_filp->f_path.dentry->d_inode; | 567 | sock_inode = file_inode(server->info_filp); |
568 | if (!S_ISSOCK(sock_inode->i_mode)) | 568 | if (!S_ISSOCK(sock_inode->i_mode)) |
569 | goto out_fput2; | 569 | goto out_fput2; |
570 | info_sock = SOCKET_I(sock_inode); | 570 | info_sock = SOCKET_I(sock_inode); |
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index 6958adfaff08..5c1e9262219c 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c | |||
@@ -808,7 +808,7 @@ outrel: | |||
808 | 808 | ||
809 | long ncp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 809 | long ncp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
810 | { | 810 | { |
811 | struct inode *inode = filp->f_dentry->d_inode; | 811 | struct inode *inode = file_inode(filp); |
812 | struct ncp_server *server = NCP_SERVER(inode); | 812 | struct ncp_server *server = NCP_SERVER(inode); |
813 | uid_t uid = current_uid(); | 813 | uid_t uid = current_uid(); |
814 | int need_drop_write = 0; | 814 | int need_drop_write = 0; |
diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c index 63d14a99483d..ee24df5af1f9 100644 --- a/fs/ncpfs/mmap.c +++ b/fs/ncpfs/mmap.c | |||
@@ -105,7 +105,7 @@ static const struct vm_operations_struct ncp_file_mmap = | |||
105 | /* This is used for a general mmap of a ncp file */ | 105 | /* This is used for a general mmap of a ncp file */ |
106 | int ncp_mmap(struct file *file, struct vm_area_struct *vma) | 106 | int ncp_mmap(struct file *file, struct vm_area_struct *vma) |
107 | { | 107 | { |
108 | struct inode *inode = file->f_path.dentry->d_inode; | 108 | struct inode *inode = file_inode(file); |
109 | 109 | ||
110 | DPRINTK("ncp_mmap: called\n"); | 110 | DPRINTK("ncp_mmap: called\n"); |
111 | 111 | ||