new helper: file_inode(file)
[linux-block.git] / net / netlink / af_netlink.c
index c0353d55d56fc4221d72153c6f54849cb89f292b..c1ee3a8cf11145ff952c3a5ab0b2391345c47fc6 100644 (file)
@@ -809,7 +809,7 @@ static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid)
 
 struct sock *netlink_getsockbyfilp(struct file *filp)
 {
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(filp);
        struct sock *sock;
 
        if (!S_ISSOCK(inode->i_mode))