aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/hypfs/inode.c6
-rw-r--r--arch/x86/kernel/msr.c9
-rw-r--r--drivers/staging/comedi/comedi_fops.c14
-rw-r--r--drivers/tty/tty_io.c16
-rw-r--r--fs/ext4/indirect.c2
-rw-r--r--fs/f2fs/file.c6
-rw-r--r--fs/fuse/dev.c2
-rw-r--r--fs/fuse/file.c24
-rw-r--r--fs/seq_file.c2
-rw-r--r--kernel/futex.c2
10 files changed, 38 insertions, 45 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 280ded8b79ba..8538015ed4a0 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -171,12 +171,10 @@ static ssize_t hypfs_aio_write(struct kiocb *iocb, const struct iovec *iov,
171 unsigned long nr_segs, loff_t offset) 171 unsigned long nr_segs, loff_t offset)
172{ 172{
173 int rc; 173 int rc;
174 struct super_block *sb; 174 struct super_block *sb = file_inode(iocb->ki_filp)->i_sb;
175 struct hypfs_sb_info *fs_info; 175 struct hypfs_sb_info *fs_info = sb->s_fs_info;
176 size_t count = iov_length(iov, nr_segs); 176 size_t count = iov_length(iov, nr_segs);
177 177
178 sb = iocb->ki_filp->f_path.dentry->d_inode->i_sb;
179 fs_info = sb->s_fs_info;
180 /* 178 /*
181 * Currently we only allow one update per second for two reasons: 179 * Currently we only allow one update per second for two reasons:
182 * 1. diag 204 is VERY expensive 180 * 1. diag 204 is VERY expensive
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 4929502c1372..ce130493b802 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -71,7 +71,7 @@ static ssize_t msr_read(struct file *file, char __user *buf,
71 u32 __user *tmp = (u32 __user *) buf; 71 u32 __user *tmp = (u32 __user *) buf;
72 u32 data[2]; 72 u32 data[2];
73 u32 reg = *ppos; 73 u32 reg = *ppos;
74 int cpu = iminor(file->f_path.dentry->d_inode); 74 int cpu = iminor(file_inode(file));
75 int err = 0; 75 int err = 0;
76 ssize_t bytes = 0; 76 ssize_t bytes = 0;
77 77
@@ -99,7 +99,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
99 const u32 __user *tmp = (const u32 __user *)buf; 99 const u32 __user *tmp = (const u32 __user *)buf;
100 u32 data[2]; 100 u32 data[2];
101 u32 reg = *ppos; 101 u32 reg = *ppos;
102 int cpu = iminor(file->f_path.dentry->d_inode); 102 int cpu = iminor(file_inode(file));
103 int err = 0; 103 int err = 0;
104 ssize_t bytes = 0; 104 ssize_t bytes = 0;
105 105
@@ -125,7 +125,7 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
125{ 125{
126 u32 __user *uregs = (u32 __user *)arg; 126 u32 __user *uregs = (u32 __user *)arg;
127 u32 regs[8]; 127 u32 regs[8];
128 int cpu = iminor(file->f_path.dentry->d_inode); 128 int cpu = iminor(file_inode(file));
129 int err; 129 int err;
130 130
131 switch (ioc) { 131 switch (ioc) {
@@ -171,13 +171,12 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
171 171
172static int msr_open(struct inode *inode, struct file *file) 172static int msr_open(struct inode *inode, struct file *file)
173{ 173{
174 unsigned int cpu; 174 unsigned int cpu = iminor(file_inode(file));
175 struct cpuinfo_x86 *c; 175 struct cpuinfo_x86 *c;
176 176
177 if (!capable(CAP_SYS_RAWIO)) 177 if (!capable(CAP_SYS_RAWIO))
178 return -EPERM; 178 return -EPERM;
179 179
180 cpu = iminor(file->f_path.dentry->d_inode);
181 if (cpu >= nr_cpu_ids || !cpu_online(cpu)) 180 if (cpu >= nr_cpu_ids || !cpu_online(cpu))
182 return -ENXIO; /* No such CPU */ 181 return -ENXIO; /* No such CPU */
183 182
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 195d56d8a1ee..e336b281b847 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -580,7 +580,7 @@ static int do_devinfo_ioctl(struct comedi_device *dev,
580 struct comedi_devinfo __user *arg, 580 struct comedi_devinfo __user *arg,
581 struct file *file) 581 struct file *file)
582{ 582{
583 const unsigned minor = iminor(file->f_dentry->d_inode); 583 const unsigned minor = iminor(file_inode(file));
584 struct comedi_file_info *info = comedi_file_info_from_minor(minor); 584 struct comedi_file_info *info = comedi_file_info_from_minor(minor);
585 struct comedi_subdevice *s; 585 struct comedi_subdevice *s;
586 struct comedi_devinfo devinfo; 586 struct comedi_devinfo devinfo;
@@ -1615,7 +1615,7 @@ static int do_poll_ioctl(struct comedi_device *dev, unsigned int arg,
1615static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd, 1615static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
1616 unsigned long arg) 1616 unsigned long arg)
1617{ 1617{
1618 const unsigned minor = iminor(file->f_dentry->d_inode); 1618 const unsigned minor = iminor(file_inode(file));
1619 struct comedi_file_info *info = comedi_file_info_from_minor(minor); 1619 struct comedi_file_info *info = comedi_file_info_from_minor(minor);
1620 struct comedi_device *dev = comedi_dev_from_file_info(info); 1620 struct comedi_device *dev = comedi_dev_from_file_info(info);
1621 int rc; 1621 int rc;
@@ -1743,7 +1743,7 @@ static struct vm_operations_struct comedi_vm_ops = {
1743 1743
1744static int comedi_mmap(struct file *file, struct vm_area_struct *vma) 1744static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
1745{ 1745{
1746 const unsigned minor = iminor(file->f_dentry->d_inode); 1746 const unsigned minor = iminor(file_inode(file));
1747 struct comedi_file_info *info = comedi_file_info_from_minor(minor); 1747 struct comedi_file_info *info = comedi_file_info_from_minor(minor);
1748 struct comedi_device *dev = comedi_dev_from_file_info(info); 1748 struct comedi_device *dev = comedi_dev_from_file_info(info);
1749 struct comedi_subdevice *s; 1749 struct comedi_subdevice *s;
@@ -1823,7 +1823,7 @@ done:
1823static unsigned int comedi_poll(struct file *file, poll_table *wait) 1823static unsigned int comedi_poll(struct file *file, poll_table *wait)
1824{ 1824{
1825 unsigned int mask = 0; 1825 unsigned int mask = 0;
1826 const unsigned minor = iminor(file->f_dentry->d_inode); 1826 const unsigned minor = iminor(file_inode(file));
1827 struct comedi_file_info *info = comedi_file_info_from_minor(minor); 1827 struct comedi_file_info *info = comedi_file_info_from_minor(minor);
1828 struct comedi_device *dev = comedi_dev_from_file_info(info); 1828 struct comedi_device *dev = comedi_dev_from_file_info(info);
1829 struct comedi_subdevice *s; 1829 struct comedi_subdevice *s;
@@ -1869,7 +1869,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
1869 struct comedi_async *async; 1869 struct comedi_async *async;
1870 int n, m, count = 0, retval = 0; 1870 int n, m, count = 0, retval = 0;
1871 DECLARE_WAITQUEUE(wait, current); 1871 DECLARE_WAITQUEUE(wait, current);
1872 const unsigned minor = iminor(file->f_dentry->d_inode); 1872 const unsigned minor = iminor(file_inode(file));
1873 struct comedi_file_info *info = comedi_file_info_from_minor(minor); 1873 struct comedi_file_info *info = comedi_file_info_from_minor(minor);
1874 struct comedi_device *dev = comedi_dev_from_file_info(info); 1874 struct comedi_device *dev = comedi_dev_from_file_info(info);
1875 1875
@@ -1964,7 +1964,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
1964 struct comedi_async *async; 1964 struct comedi_async *async;
1965 int n, m, count = 0, retval = 0; 1965 int n, m, count = 0, retval = 0;
1966 DECLARE_WAITQUEUE(wait, current); 1966 DECLARE_WAITQUEUE(wait, current);
1967 const unsigned minor = iminor(file->f_dentry->d_inode); 1967 const unsigned minor = iminor(file_inode(file));
1968 struct comedi_file_info *info = comedi_file_info_from_minor(minor); 1968 struct comedi_file_info *info = comedi_file_info_from_minor(minor);
1969 struct comedi_device *dev = comedi_dev_from_file_info(info); 1969 struct comedi_device *dev = comedi_dev_from_file_info(info);
1970 1970
@@ -2133,7 +2133,7 @@ ok:
2133 2133
2134static int comedi_fasync(int fd, struct file *file, int on) 2134static int comedi_fasync(int fd, struct file *file, int on)
2135{ 2135{
2136 const unsigned minor = iminor(file->f_dentry->d_inode); 2136 const unsigned minor = iminor(file_inode(file));
2137 struct comedi_device *dev = comedi_dev_from_minor(minor); 2137 struct comedi_device *dev = comedi_dev_from_minor(minor);
2138 2138
2139 if (!dev) 2139 if (!dev)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index fd473639ab70..05400acbc456 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -960,11 +960,10 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
960 loff_t *ppos) 960 loff_t *ppos)
961{ 961{
962 int i; 962 int i;
963 struct inode *inode = file->f_path.dentry->d_inode;
964 struct tty_struct *tty = file_tty(file); 963 struct tty_struct *tty = file_tty(file);
965 struct tty_ldisc *ld; 964 struct tty_ldisc *ld;
966 965
967 if (tty_paranoia_check(tty, inode, "tty_read")) 966 if (tty_paranoia_check(tty, file_inode(file), "tty_read"))
968 return -EIO; 967 return -EIO;
969 if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) 968 if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags)))
970 return -EIO; 969 return -EIO;
@@ -1132,12 +1131,11 @@ void tty_write_message(struct tty_struct *tty, char *msg)
1132static ssize_t tty_write(struct file *file, const char __user *buf, 1131static ssize_t tty_write(struct file *file, const char __user *buf,
1133 size_t count, loff_t *ppos) 1132 size_t count, loff_t *ppos)
1134{ 1133{
1135 struct inode *inode = file->f_path.dentry->d_inode;
1136 struct tty_struct *tty = file_tty(file); 1134 struct tty_struct *tty = file_tty(file);
1137 struct tty_ldisc *ld; 1135 struct tty_ldisc *ld;
1138 ssize_t ret; 1136 ssize_t ret;
1139 1137
1140 if (tty_paranoia_check(tty, inode, "tty_write")) 1138 if (tty_paranoia_check(tty, file_inode(file), "tty_write"))
1141 return -EIO; 1139 return -EIO;
1142 if (!tty || !tty->ops->write || 1140 if (!tty || !tty->ops->write ||
1143 (test_bit(TTY_IO_ERROR, &tty->flags))) 1141 (test_bit(TTY_IO_ERROR, &tty->flags)))
@@ -2047,7 +2045,7 @@ static unsigned int tty_poll(struct file *filp, poll_table *wait)
2047 struct tty_ldisc *ld; 2045 struct tty_ldisc *ld;
2048 int ret = 0; 2046 int ret = 0;
2049 2047
2050 if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_poll")) 2048 if (tty_paranoia_check(tty, file_inode(filp), "tty_poll"))
2051 return 0; 2049 return 0;
2052 2050
2053 ld = tty_ldisc_ref_wait(tty); 2051 ld = tty_ldisc_ref_wait(tty);
@@ -2063,7 +2061,7 @@ static int __tty_fasync(int fd, struct file *filp, int on)
2063 unsigned long flags; 2061 unsigned long flags;
2064 int retval = 0; 2062 int retval = 0;
2065 2063
2066 if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_fasync")) 2064 if (tty_paranoia_check(tty, file_inode(filp), "tty_fasync"))
2067 goto out; 2065 goto out;
2068 2066
2069 retval = fasync_helper(fd, filp, on, &tty->fasync); 2067 retval = fasync_helper(fd, filp, on, &tty->fasync);
@@ -2637,9 +2635,8 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2637 void __user *p = (void __user *)arg; 2635 void __user *p = (void __user *)arg;
2638 int retval; 2636 int retval;
2639 struct tty_ldisc *ld; 2637 struct tty_ldisc *ld;
2640 struct inode *inode = file->f_dentry->d_inode;
2641 2638
2642 if (tty_paranoia_check(tty, inode, "tty_ioctl")) 2639 if (tty_paranoia_check(tty, file_inode(file), "tty_ioctl"))
2643 return -EINVAL; 2640 return -EINVAL;
2644 2641
2645 real_tty = tty_pair_get_tty(tty); 2642 real_tty = tty_pair_get_tty(tty);
@@ -2780,12 +2777,11 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2780static long tty_compat_ioctl(struct file *file, unsigned int cmd, 2777static long tty_compat_ioctl(struct file *file, unsigned int cmd,
2781 unsigned long arg) 2778 unsigned long arg)
2782{ 2779{
2783 struct inode *inode = file->f_dentry->d_inode;
2784 struct tty_struct *tty = file_tty(file); 2780 struct tty_struct *tty = file_tty(file);
2785 struct tty_ldisc *ld; 2781 struct tty_ldisc *ld;
2786 int retval = -ENOIOCTLCMD; 2782 int retval = -ENOIOCTLCMD;
2787 2783
2788 if (tty_paranoia_check(tty, inode, "tty_ioctl")) 2784 if (tty_paranoia_check(tty, file_inode(file), "tty_ioctl"))
2789 return -EINVAL; 2785 return -EINVAL;
2790 2786
2791 if (tty->ops->compat_ioctl) { 2787 if (tty->ops->compat_ioctl) {
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index c541ab8b64dd..b505a145a593 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -1606,7 +1606,7 @@ err:
1606 1606
1607int ext4_ind_punch_hole(struct file *file, loff_t offset, loff_t length) 1607int ext4_ind_punch_hole(struct file *file, loff_t offset, loff_t length)
1608{ 1608{
1609 struct inode *inode = file->f_path.dentry->d_inode; 1609 struct inode *inode = file_inode(file);
1610 struct super_block *sb = inode->i_sb; 1610 struct super_block *sb = inode->i_sb;
1611 ext4_lblk_t first_block, stop_block; 1611 ext4_lblk_t first_block, stop_block;
1612 struct address_space *mapping = inode->i_mapping; 1612 struct address_space *mapping = inode->i_mapping;
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index b7a053d4c6d3..958a46da19ae 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -29,7 +29,7 @@ static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma,
29 struct vm_fault *vmf) 29 struct vm_fault *vmf)
30{ 30{
31 struct page *page = vmf->page; 31 struct page *page = vmf->page;
32 struct inode *inode = vma->vm_file->f_path.dentry->d_inode; 32 struct inode *inode = file_inode(vma->vm_file);
33 struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); 33 struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
34 block_t old_blk_addr; 34 block_t old_blk_addr;
35 struct dnode_of_data dn; 35 struct dnode_of_data dn;
@@ -544,7 +544,7 @@ static int expand_inode_data(struct inode *inode, loff_t offset,
544static long f2fs_fallocate(struct file *file, int mode, 544static long f2fs_fallocate(struct file *file, int mode,
545 loff_t offset, loff_t len) 545 loff_t offset, loff_t len)
546{ 546{
547 struct inode *inode = file->f_path.dentry->d_inode; 547 struct inode *inode = file_inode(file);
548 long ret; 548 long ret;
549 549
550 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) 550 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
@@ -577,7 +577,7 @@ static inline __u32 f2fs_mask_flags(umode_t mode, __u32 flags)
577 577
578long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 578long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
579{ 579{
580 struct inode *inode = filp->f_dentry->d_inode; 580 struct inode *inode = file_inode(filp);
581 struct f2fs_inode_info *fi = F2FS_I(inode); 581 struct f2fs_inode_info *fi = F2FS_I(inode);
582 unsigned int flags; 582 unsigned int flags;
583 int ret; 583 int ret;
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index e9bdec0b16d9..11dfa0c3fb46 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -532,7 +532,7 @@ void fuse_request_send_background_locked(struct fuse_conn *fc,
532 532
533void fuse_force_forget(struct file *file, u64 nodeid) 533void fuse_force_forget(struct file *file, u64 nodeid)
534{ 534{
535 struct inode *inode = file->f_path.dentry->d_inode; 535 struct inode *inode = file_inode(file);
536 struct fuse_conn *fc = get_fuse_conn(inode); 536 struct fuse_conn *fc = get_fuse_conn(inode);
537 struct fuse_req *req; 537 struct fuse_req *req;
538 struct fuse_forget_in inarg; 538 struct fuse_forget_in inarg;
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index c8071768b950..34b80ba95bad 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -355,7 +355,7 @@ static int fuse_wait_on_page_writeback(struct inode *inode, pgoff_t index)
355 355
356static int fuse_flush(struct file *file, fl_owner_t id) 356static int fuse_flush(struct file *file, fl_owner_t id)
357{ 357{
358 struct inode *inode = file->f_path.dentry->d_inode; 358 struct inode *inode = file_inode(file);
359 struct fuse_conn *fc = get_fuse_conn(inode); 359 struct fuse_conn *fc = get_fuse_conn(inode);
360 struct fuse_file *ff = file->private_data; 360 struct fuse_file *ff = file->private_data;
361 struct fuse_req *req; 361 struct fuse_req *req;
@@ -1215,7 +1215,7 @@ static ssize_t __fuse_direct_read(struct file *file, const struct iovec *iov,
1215 unsigned long nr_segs, loff_t *ppos) 1215 unsigned long nr_segs, loff_t *ppos)
1216{ 1216{
1217 ssize_t res; 1217 ssize_t res;
1218 struct inode *inode = file->f_path.dentry->d_inode; 1218 struct inode *inode = file_inode(file);
1219 1219
1220 if (is_bad_inode(inode)) 1220 if (is_bad_inode(inode))
1221 return -EIO; 1221 return -EIO;
@@ -1238,7 +1238,7 @@ static ssize_t fuse_direct_read(struct file *file, char __user *buf,
1238static ssize_t __fuse_direct_write(struct file *file, const struct iovec *iov, 1238static ssize_t __fuse_direct_write(struct file *file, const struct iovec *iov,
1239 unsigned long nr_segs, loff_t *ppos) 1239 unsigned long nr_segs, loff_t *ppos)
1240{ 1240{
1241 struct inode *inode = file->f_path.dentry->d_inode; 1241 struct inode *inode = file_inode(file);
1242 size_t count = iov_length(iov, nr_segs); 1242 size_t count = iov_length(iov, nr_segs);
1243 ssize_t res; 1243 ssize_t res;
1244 1244
@@ -1258,7 +1258,7 @@ static ssize_t fuse_direct_write(struct file *file, const char __user *buf,
1258 size_t count, loff_t *ppos) 1258 size_t count, loff_t *ppos)
1259{ 1259{
1260 struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count }; 1260 struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count };
1261 struct inode *inode = file->f_path.dentry->d_inode; 1261 struct inode *inode = file_inode(file);
1262 ssize_t res; 1262 ssize_t res;
1263 1263
1264 if (is_bad_inode(inode)) 1264 if (is_bad_inode(inode))
@@ -1485,7 +1485,7 @@ static const struct vm_operations_struct fuse_file_vm_ops = {
1485static int fuse_file_mmap(struct file *file, struct vm_area_struct *vma) 1485static int fuse_file_mmap(struct file *file, struct vm_area_struct *vma)
1486{ 1486{
1487 if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) { 1487 if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) {
1488 struct inode *inode = file->f_dentry->d_inode; 1488 struct inode *inode = file_inode(file);
1489 struct fuse_conn *fc = get_fuse_conn(inode); 1489 struct fuse_conn *fc = get_fuse_conn(inode);
1490 struct fuse_inode *fi = get_fuse_inode(inode); 1490 struct fuse_inode *fi = get_fuse_inode(inode);
1491 struct fuse_file *ff = file->private_data; 1491 struct fuse_file *ff = file->private_data;
@@ -1543,7 +1543,7 @@ static void fuse_lk_fill(struct fuse_req *req, struct file *file,
1543 const struct file_lock *fl, int opcode, pid_t pid, 1543 const struct file_lock *fl, int opcode, pid_t pid,
1544 int flock) 1544 int flock)
1545{ 1545{
1546 struct inode *inode = file->f_path.dentry->d_inode; 1546 struct inode *inode = file_inode(file);
1547 struct fuse_conn *fc = get_fuse_conn(inode); 1547 struct fuse_conn *fc = get_fuse_conn(inode);
1548 struct fuse_file *ff = file->private_data; 1548 struct fuse_file *ff = file->private_data;
1549 struct fuse_lk_in *arg = &req->misc.lk_in; 1549 struct fuse_lk_in *arg = &req->misc.lk_in;
@@ -1565,7 +1565,7 @@ static void fuse_lk_fill(struct fuse_req *req, struct file *file,
1565 1565
1566static int fuse_getlk(struct file *file, struct file_lock *fl) 1566static int fuse_getlk(struct file *file, struct file_lock *fl)
1567{ 1567{
1568 struct inode *inode = file->f_path.dentry->d_inode; 1568 struct inode *inode = file_inode(file);
1569 struct fuse_conn *fc = get_fuse_conn(inode); 1569 struct fuse_conn *fc = get_fuse_conn(inode);
1570 struct fuse_req *req; 1570 struct fuse_req *req;
1571 struct fuse_lk_out outarg; 1571 struct fuse_lk_out outarg;
@@ -1590,7 +1590,7 @@ static int fuse_getlk(struct file *file, struct file_lock *fl)
1590 1590
1591static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) 1591static int fuse_setlk(struct file *file, struct file_lock *fl, int flock)
1592{ 1592{
1593 struct inode *inode = file->f_path.dentry->d_inode; 1593 struct inode *inode = file_inode(file);
1594 struct fuse_conn *fc = get_fuse_conn(inode); 1594 struct fuse_conn *fc = get_fuse_conn(inode);
1595 struct fuse_req *req; 1595 struct fuse_req *req;
1596 int opcode = (fl->fl_flags & FL_SLEEP) ? FUSE_SETLKW : FUSE_SETLK; 1596 int opcode = (fl->fl_flags & FL_SLEEP) ? FUSE_SETLKW : FUSE_SETLK;
@@ -1622,7 +1622,7 @@ static int fuse_setlk(struct file *file, struct file_lock *fl, int flock)
1622 1622
1623static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) 1623static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl)
1624{ 1624{
1625 struct inode *inode = file->f_path.dentry->d_inode; 1625 struct inode *inode = file_inode(file);
1626 struct fuse_conn *fc = get_fuse_conn(inode); 1626 struct fuse_conn *fc = get_fuse_conn(inode);
1627 int err; 1627 int err;
1628 1628
@@ -1645,7 +1645,7 @@ static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl)
1645 1645
1646static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl) 1646static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl)
1647{ 1647{
1648 struct inode *inode = file->f_path.dentry->d_inode; 1648 struct inode *inode = file_inode(file);
1649 struct fuse_conn *fc = get_fuse_conn(inode); 1649 struct fuse_conn *fc = get_fuse_conn(inode);
1650 int err; 1650 int err;
1651 1651
@@ -1702,7 +1702,7 @@ static sector_t fuse_bmap(struct address_space *mapping, sector_t block)
1702static loff_t fuse_file_llseek(struct file *file, loff_t offset, int whence) 1702static loff_t fuse_file_llseek(struct file *file, loff_t offset, int whence)
1703{ 1703{
1704 loff_t retval; 1704 loff_t retval;
1705 struct inode *inode = file->f_path.dentry->d_inode; 1705 struct inode *inode = file_inode(file);
1706 1706
1707 /* No i_mutex protection necessary for SEEK_CUR and SEEK_SET */ 1707 /* No i_mutex protection necessary for SEEK_CUR and SEEK_SET */
1708 if (whence == SEEK_CUR || whence == SEEK_SET) 1708 if (whence == SEEK_CUR || whence == SEEK_SET)
@@ -2079,7 +2079,7 @@ EXPORT_SYMBOL_GPL(fuse_do_ioctl);
2079long fuse_ioctl_common(struct file *file, unsigned int cmd, 2079long fuse_ioctl_common(struct file *file, unsigned int cmd,
2080 unsigned long arg, unsigned int flags) 2080 unsigned long arg, unsigned int flags)
2081{ 2081{
2082 struct inode *inode = file->f_dentry->d_inode; 2082 struct inode *inode = file_inode(file);
2083 struct fuse_conn *fc = get_fuse_conn(inode); 2083 struct fuse_conn *fc = get_fuse_conn(inode);
2084 2084
2085 if (!fuse_allow_current_process(fc)) 2085 if (!fuse_allow_current_process(fc))
diff --git a/fs/seq_file.c b/fs/seq_file.c
index f2bc3dfd0b88..f9538ea2a756 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -339,7 +339,7 @@ EXPORT_SYMBOL(seq_lseek);
339/** 339/**
340 * seq_release - free the structures associated with sequential file. 340 * seq_release - free the structures associated with sequential file.
341 * @file: file in question 341 * @file: file in question
342 * @inode: file->f_path.dentry->d_inode 342 * @inode: its inode
343 * 343 *
344 * Frees the structures associated with sequential file; can be used 344 * Frees the structures associated with sequential file; can be used
345 * as ->f_op->release() if you don't have private data to destroy. 345 * as ->f_op->release() if you don't have private data to destroy.
diff --git a/kernel/futex.c b/kernel/futex.c
index fbc07a29ec53..f0090a993dab 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -226,7 +226,7 @@ static void drop_futex_key_refs(union futex_key *key)
226 * Returns a negative error code or 0 226 * Returns a negative error code or 0
227 * The key words are stored in *key on success. 227 * The key words are stored in *key on success.
228 * 228 *
229 * For shared mappings, it's (page->index, vma->vm_file->f_path.dentry->d_inode, 229 * For shared mappings, it's (page->index, file_inode(vma->vm_file),
230 * offset_within_page). For private mappings, it's (uaddr, current->mm). 230 * offset_within_page). For private mappings, it's (uaddr, current->mm).
231 * We can usually work out the index without swapping in the page. 231 * We can usually work out the index without swapping in the page.
232 * 232 *