mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
|
@ -525,7 +525,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
|
|||
if (!ncp_filp)
|
||||
goto out;
|
||||
error = -ENOTSOCK;
|
||||
sock_inode = ncp_filp->f_path.dentry->d_inode;
|
||||
sock_inode = file_inode(ncp_filp);
|
||||
if (!S_ISSOCK(sock_inode->i_mode))
|
||||
goto out_fput;
|
||||
sock = SOCKET_I(sock_inode);
|
||||
|
|
@ -564,7 +564,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
|
|||
if (!server->info_filp)
|
||||
goto out_bdi;
|
||||
error = -ENOTSOCK;
|
||||
sock_inode = server->info_filp->f_path.dentry->d_inode;
|
||||
sock_inode = file_inode(server->info_filp);
|
||||
if (!S_ISSOCK(sock_inode->i_mode))
|
||||
goto out_fput2;
|
||||
info_sock = SOCKET_I(sock_inode);
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ outrel:
|
|||
|
||||
long ncp_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct inode *inode = filp->f_dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct ncp_server *server = NCP_SERVER(inode);
|
||||
uid_t uid = current_uid();
|
||||
int need_drop_write = 0;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ static const struct vm_operations_struct ncp_file_mmap =
|
|||
/* This is used for a general mmap of a ncp file */
|
||||
int ncp_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
|
||||
DPRINTK("ncp_mmap: called\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue