aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /drivers
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/char/dsp56k.c8
-rw-r--r--drivers/char/dtlk.c4
-rw-r--r--drivers/char/lp.c8
-rw-r--r--drivers/char/mem.c4
-rw-r--r--drivers/char/nsc_gpio.c4
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c2
-rw-r--r--drivers/char/ppdev.c6
-rw-r--r--drivers/char/ps3flash.c2
-rw-r--r--drivers/char/raw.c2
-rw-r--r--drivers/char/sonypi.c2
-rw-r--r--drivers/char/tb0219.c4
-rw-r--r--drivers/gpu/drm/gma500/gtt.c2
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c10
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c4
-rw-r--r--drivers/gpu/drm/udl/udl_gem.c2
-rw-r--r--drivers/hid/hid-roccat.c2
-rw-r--r--drivers/hid/hidraw.c6
-rw-r--r--drivers/i2c/i2c-dev.c4
-rw-r--r--drivers/ide/ide-proc.c4
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c6
-rw-r--r--drivers/infiniband/hw/qib/qib_file_ops.c2
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c4
-rw-r--r--drivers/iommu/tegra-smmu.c4
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c6
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c4
-rw-r--r--drivers/isdn/i4l/isdn_common.c8
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c2
-rw-r--r--drivers/md/bitmap.c4
-rw-r--r--drivers/media/pci/zoran/zoran_procfs.c2
-rw-r--r--drivers/media/rc/lirc_dev.c14
-rw-r--r--drivers/media/v4l2-core/v4l2-dev.c2
-rw-r--r--drivers/mtd/ubi/cdev.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c2
-rw-r--r--drivers/net/wan/cosa.c4
-rw-r--r--drivers/net/wireless/ray_cs.c2
-rw-r--r--drivers/parisc/led.c2
-rw-r--r--drivers/pci/proc.c10
-rw-r--r--drivers/platform/x86/sony-laptop.c2
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c2
-rw-r--r--drivers/platform/x86/toshiba_acpi.c8
-rw-r--r--drivers/pnp/isapnp/proc.c4
-rw-r--r--drivers/pnp/pnpbios/proc.c2
-rw-r--r--drivers/s390/char/fs3270.c4
-rw-r--r--drivers/s390/char/tape_char.c8
-rw-r--r--drivers/s390/char/vmur.c2
-rw-r--r--drivers/s390/cio/qdio_debug.c4
-rw-r--r--drivers/sbus/char/display7seg.c2
-rw-r--r--drivers/scsi/3w-9xxx.c2
-rw-r--r--drivers/scsi/3w-sas.c2
-rw-r--r--drivers/scsi/3w-xxxx.c2
-rw-r--r--drivers/scsi/csiostor/csio_init.c2
-rw-r--r--drivers/scsi/dpt_i2o.c4
-rw-r--r--drivers/scsi/st.c2
-rw-r--r--drivers/staging/bcm/Misc.c2
-rw-r--r--drivers/staging/ccg/f_mass_storage.c2
-rw-r--r--drivers/staging/ccg/rndis.c2
-rw-r--r--drivers/staging/ccg/storage_common.c2
-rw-r--r--drivers/staging/dgrp/dgrp_specproc.c4
-rw-r--r--drivers/staging/omapdrm/omap_gem_helpers.c2
-rw-r--r--drivers/staging/usbip/usbip_common.c2
-rw-r--r--drivers/staging/vme/devices/vme_user.c8
-rw-r--r--drivers/target/target_core_file.c2
-rw-r--r--drivers/tty/vt/vc_screen.c8
-rw-r--r--drivers/usb/core/devices.c4
-rw-r--r--drivers/usb/core/devio.c6
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c8
-rw-r--r--drivers/usb/gadget/f_mass_storage.c2
-rw-r--r--drivers/usb/gadget/printer.c2
-rw-r--r--drivers/usb/gadget/rndis.c2
-rw-r--r--drivers/usb/gadget/storage_common.c2
-rw-r--r--drivers/video/fb_defio.c2
-rw-r--r--drivers/video/fbmem.c2
-rw-r--r--drivers/video/msm/mdp.c2
-rw-r--r--drivers/watchdog/cpwd.c4
-rw-r--r--drivers/zorro/proc.c4
79 files changed, 147 insertions, 149 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 9a13e889837e..8f12dc78a848 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -6547,7 +6547,7 @@ static ssize_t dac960_user_command_proc_write(struct file *file,
6547 const char __user *Buffer, 6547 const char __user *Buffer,
6548 size_t Count, loff_t *pos) 6548 size_t Count, loff_t *pos)
6549{ 6549{
6550 DAC960_Controller_T *Controller = (DAC960_Controller_T *) PDE(file->f_path.dentry->d_inode)->data; 6550 DAC960_Controller_T *Controller = (DAC960_Controller_T *) PDE(file_inode(file))->data;
6551 unsigned char CommandBuffer[80]; 6551 unsigned char CommandBuffer[80];
6552 int Length; 6552 int Length;
6553 if (Count > sizeof(CommandBuffer)-1) return -EINVAL; 6553 if (Count > sizeof(CommandBuffer)-1) return -EINVAL;
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 043ddcca4abf..ade146bf65e5 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -625,7 +625,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
625 return -EBUSY; 625 return -EBUSY;
626 file = fget(arg); 626 file = fget(arg);
627 if (file) { 627 if (file) {
628 struct inode *inode = file->f_path.dentry->d_inode; 628 struct inode *inode = file_inode(file);
629 if (S_ISSOCK(inode->i_mode)) { 629 if (S_ISSOCK(inode->i_mode)) {
630 nbd->file = file; 630 nbd->file = file;
631 nbd->sock = SOCKET_I(inode); 631 nbd->sock = SOCKET_I(inode);
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index 052797b32bd3..01a5ca7425d7 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -181,7 +181,7 @@ static int dsp56k_upload(u_char __user *bin, int len)
181static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count, 181static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
182 loff_t *ppos) 182 loff_t *ppos)
183{ 183{
184 struct inode *inode = file->f_path.dentry->d_inode; 184 struct inode *inode = file_inode(file);
185 int dev = iminor(inode) & 0x0f; 185 int dev = iminor(inode) & 0x0f;
186 186
187 switch(dev) 187 switch(dev)
@@ -244,7 +244,7 @@ static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
244static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count, 244static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count,
245 loff_t *ppos) 245 loff_t *ppos)
246{ 246{
247 struct inode *inode = file->f_path.dentry->d_inode; 247 struct inode *inode = file_inode(file);
248 int dev = iminor(inode) & 0x0f; 248 int dev = iminor(inode) & 0x0f;
249 249
250 switch(dev) 250 switch(dev)
@@ -306,7 +306,7 @@ static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t co
306static long dsp56k_ioctl(struct file *file, unsigned int cmd, 306static long dsp56k_ioctl(struct file *file, unsigned int cmd,
307 unsigned long arg) 307 unsigned long arg)
308{ 308{
309 int dev = iminor(file->f_path.dentry->d_inode) & 0x0f; 309 int dev = iminor(file_inode(file)) & 0x0f;
310 void __user *argp = (void __user *)arg; 310 void __user *argp = (void __user *)arg;
311 311
312 switch(dev) 312 switch(dev)
@@ -408,7 +408,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd,
408#if 0 408#if 0
409static unsigned int dsp56k_poll(struct file *file, poll_table *wait) 409static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
410{ 410{
411 int dev = iminor(file->f_path.dentry->d_inode) & 0x0f; 411 int dev = iminor(file_inode(file)) & 0x0f;
412 412
413 switch(dev) 413 switch(dev)
414 { 414 {
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 85156dd0caee..65a8d96c0e93 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -125,7 +125,7 @@ static char dtlk_write_tts(char);
125static ssize_t dtlk_read(struct file *file, char __user *buf, 125static ssize_t dtlk_read(struct file *file, char __user *buf,
126 size_t count, loff_t * ppos) 126 size_t count, loff_t * ppos)
127{ 127{
128 unsigned int minor = iminor(file->f_path.dentry->d_inode); 128 unsigned int minor = iminor(file_inode(file));
129 char ch; 129 char ch;
130 int i = 0, retries; 130 int i = 0, retries;
131 131
@@ -177,7 +177,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
177 } 177 }
178#endif 178#endif
179 179
180 if (iminor(file->f_path.dentry->d_inode) != DTLK_MINOR) 180 if (iminor(file_inode(file)) != DTLK_MINOR)
181 return -EINVAL; 181 return -EINVAL;
182 182
183 while (1) { 183 while (1) {
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index a741e418b456..dafd9ac6428f 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -294,7 +294,7 @@ static int lp_wait_ready(int minor, int nonblock)
294static ssize_t lp_write(struct file * file, const char __user * buf, 294static ssize_t lp_write(struct file * file, const char __user * buf,
295 size_t count, loff_t *ppos) 295 size_t count, loff_t *ppos)
296{ 296{
297 unsigned int minor = iminor(file->f_path.dentry->d_inode); 297 unsigned int minor = iminor(file_inode(file));
298 struct parport *port = lp_table[minor].dev->port; 298 struct parport *port = lp_table[minor].dev->port;
299 char *kbuf = lp_table[minor].lp_buffer; 299 char *kbuf = lp_table[minor].lp_buffer;
300 ssize_t retv = 0; 300 ssize_t retv = 0;
@@ -413,7 +413,7 @@ static ssize_t lp_read(struct file * file, char __user * buf,
413 size_t count, loff_t *ppos) 413 size_t count, loff_t *ppos)
414{ 414{
415 DEFINE_WAIT(wait); 415 DEFINE_WAIT(wait);
416 unsigned int minor=iminor(file->f_path.dentry->d_inode); 416 unsigned int minor=iminor(file_inode(file));
417 struct parport *port = lp_table[minor].dev->port; 417 struct parport *port = lp_table[minor].dev->port;
418 ssize_t retval = 0; 418 ssize_t retval = 0;
419 char *kbuf = lp_table[minor].lp_buffer; 419 char *kbuf = lp_table[minor].lp_buffer;
@@ -679,7 +679,7 @@ static long lp_ioctl(struct file *file, unsigned int cmd,
679 struct timeval par_timeout; 679 struct timeval par_timeout;
680 int ret; 680 int ret;
681 681
682 minor = iminor(file->f_path.dentry->d_inode); 682 minor = iminor(file_inode(file));
683 mutex_lock(&lp_mutex); 683 mutex_lock(&lp_mutex);
684 switch (cmd) { 684 switch (cmd) {
685 case LPSETTIMEOUT: 685 case LPSETTIMEOUT:
@@ -707,7 +707,7 @@ static long lp_compat_ioctl(struct file *file, unsigned int cmd,
707 struct timeval par_timeout; 707 struct timeval par_timeout;
708 int ret; 708 int ret;
709 709
710 minor = iminor(file->f_path.dentry->d_inode); 710 minor = iminor(file_inode(file));
711 mutex_lock(&lp_mutex); 711 mutex_lock(&lp_mutex);
712 switch (cmd) { 712 switch (cmd) {
713 case LPSETTIMEOUT: 713 case LPSETTIMEOUT:
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index c6fa3bc2baa8..e23b4a247b72 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -708,7 +708,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
708{ 708{
709 loff_t ret; 709 loff_t ret;
710 710
711 mutex_lock(&file->f_path.dentry->d_inode->i_mutex); 711 mutex_lock(&file_inode(file)->i_mutex);
712 switch (orig) { 712 switch (orig) {
713 case SEEK_CUR: 713 case SEEK_CUR:
714 offset += file->f_pos; 714 offset += file->f_pos;
@@ -725,7 +725,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
725 default: 725 default:
726 ret = -EINVAL; 726 ret = -EINVAL;
727 } 727 }
728 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); 728 mutex_unlock(&file_inode(file)->i_mutex);
729 return ret; 729 return ret;
730} 730}
731 731
diff --git a/drivers/char/nsc_gpio.c b/drivers/char/nsc_gpio.c
index 808d44e9a32a..b07b119ae57f 100644
--- a/drivers/char/nsc_gpio.c
+++ b/drivers/char/nsc_gpio.c
@@ -41,7 +41,7 @@ void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index)
41ssize_t nsc_gpio_write(struct file *file, const char __user *data, 41ssize_t nsc_gpio_write(struct file *file, const char __user *data,
42 size_t len, loff_t *ppos) 42 size_t len, loff_t *ppos)
43{ 43{
44 unsigned m = iminor(file->f_path.dentry->d_inode); 44 unsigned m = iminor(file_inode(file));
45 struct nsc_gpio_ops *amp = file->private_data; 45 struct nsc_gpio_ops *amp = file->private_data;
46 struct device *dev = amp->dev; 46 struct device *dev = amp->dev;
47 size_t i; 47 size_t i;
@@ -104,7 +104,7 @@ ssize_t nsc_gpio_write(struct file *file, const char __user *data,
104ssize_t nsc_gpio_read(struct file *file, char __user * buf, 104ssize_t nsc_gpio_read(struct file *file, char __user * buf,
105 size_t len, loff_t * ppos) 105 size_t len, loff_t * ppos)
106{ 106{
107 unsigned m = iminor(file->f_path.dentry->d_inode); 107 unsigned m = iminor(file_inode(file));
108 int value; 108 int value;
109 struct nsc_gpio_ops *amp = file->private_data; 109 struct nsc_gpio_ops *amp = file->private_data;
110 110
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index a7584860e9a7..c115217c79ae 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1400,7 +1400,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
1400{ 1400{
1401 struct cm4000_dev *dev = filp->private_data; 1401 struct cm4000_dev *dev = filp->private_data;
1402 unsigned int iobase = dev->p_dev->resource[0]->start; 1402 unsigned int iobase = dev->p_dev->resource[0]->start;
1403 struct inode *inode = filp->f_path.dentry->d_inode; 1403 struct inode *inode = file_inode(filp);
1404 struct pcmcia_device *link; 1404 struct pcmcia_device *link;
1405 int size; 1405 int size;
1406 int rc; 1406 int rc;
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 1cd49241e60e..ae0b42b66e55 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -107,7 +107,7 @@ static inline void pp_enable_irq (struct pp_struct *pp)
107static ssize_t pp_read (struct file * file, char __user * buf, size_t count, 107static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
108 loff_t * ppos) 108 loff_t * ppos)
109{ 109{
110 unsigned int minor = iminor(file->f_path.dentry->d_inode); 110 unsigned int minor = iminor(file_inode(file));
111 struct pp_struct *pp = file->private_data; 111 struct pp_struct *pp = file->private_data;
112 char * kbuffer; 112 char * kbuffer;
113 ssize_t bytes_read = 0; 113 ssize_t bytes_read = 0;
@@ -189,7 +189,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
189static ssize_t pp_write (struct file * file, const char __user * buf, 189static ssize_t pp_write (struct file * file, const char __user * buf,
190 size_t count, loff_t * ppos) 190 size_t count, loff_t * ppos)
191{ 191{
192 unsigned int minor = iminor(file->f_path.dentry->d_inode); 192 unsigned int minor = iminor(file_inode(file));
193 struct pp_struct *pp = file->private_data; 193 struct pp_struct *pp = file->private_data;
194 char * kbuffer; 194 char * kbuffer;
195 ssize_t bytes_written = 0; 195 ssize_t bytes_written = 0;
@@ -324,7 +324,7 @@ static enum ieee1284_phase init_phase (int mode)
324 324
325static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 325static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
326{ 326{
327 unsigned int minor = iminor(file->f_path.dentry->d_inode); 327 unsigned int minor = iminor(file_inode(file));
328 struct pp_struct *pp = file->private_data; 328 struct pp_struct *pp = file->private_data;
329 struct parport * port; 329 struct parport * port;
330 void __user *argp = (void __user *)arg; 330 void __user *argp = (void __user *)arg;
diff --git a/drivers/char/ps3flash.c b/drivers/char/ps3flash.c
index 588063ac9517..8cafa9ccd43f 100644
--- a/drivers/char/ps3flash.c
+++ b/drivers/char/ps3flash.c
@@ -312,7 +312,7 @@ static int ps3flash_flush(struct file *file, fl_owner_t id)
312 312
313static int ps3flash_fsync(struct file *file, loff_t start, loff_t end, int datasync) 313static int ps3flash_fsync(struct file *file, loff_t start, loff_t end, int datasync)
314{ 314{
315 struct inode *inode = file->f_path.dentry->d_inode; 315 struct inode *inode = file_inode(file);
316 int err; 316 int err;
317 mutex_lock(&inode->i_mutex); 317 mutex_lock(&inode->i_mutex);
318 err = ps3flash_writeback(ps3flash_dev); 318 err = ps3flash_writeback(ps3flash_dev);
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 54a3a6d09819..f3223aac4df1 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -80,7 +80,7 @@ static int raw_open(struct inode *inode, struct file *filp)
80 filp->f_flags |= O_DIRECT; 80 filp->f_flags |= O_DIRECT;
81 filp->f_mapping = bdev->bd_inode->i_mapping; 81 filp->f_mapping = bdev->bd_inode->i_mapping;
82 if (++raw_devices[minor].inuse == 1) 82 if (++raw_devices[minor].inuse == 1)
83 filp->f_path.dentry->d_inode->i_mapping = 83 file_inode(filp)->i_mapping =
84 bdev->bd_inode->i_mapping; 84 bdev->bd_inode->i_mapping;
85 filp->private_data = bdev; 85 filp->private_data = bdev;
86 mutex_unlock(&raw_mutex); 86 mutex_unlock(&raw_mutex);
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index d780295a1473..8450e178b819 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -938,7 +938,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
938 } 938 }
939 939
940 if (ret > 0) { 940 if (ret > 0) {
941 struct inode *inode = file->f_path.dentry->d_inode; 941 struct inode *inode = file_inode(file);
942 inode->i_atime = current_fs_time(inode->i_sb); 942 inode->i_atime = current_fs_time(inode->i_sb);
943 } 943 }
944 944
diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c
index 34c63f85104d..47b9fdfcf083 100644
--- a/drivers/char/tb0219.c
+++ b/drivers/char/tb0219.c
@@ -164,7 +164,7 @@ static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t le
164 unsigned int minor; 164 unsigned int minor;
165 char value; 165 char value;
166 166
167 minor = iminor(file->f_path.dentry->d_inode); 167 minor = iminor(file_inode(file));
168 switch (minor) { 168 switch (minor) {
169 case 0: 169 case 0:
170 value = get_led(); 170 value = get_led();
@@ -200,7 +200,7 @@ static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data,
200 int retval = 0; 200 int retval = 0;
201 char c; 201 char c;
202 202
203 minor = iminor(file->f_path.dentry->d_inode); 203 minor = iminor(file_inode(file));
204 switch (minor) { 204 switch (minor) {
205 case 0: 205 case 0:
206 type = TYPE_LED; 206 type = TYPE_LED;
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index 04a371aceb34..054e26e769ec 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -202,7 +202,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
202 WARN_ON(gt->pages); 202 WARN_ON(gt->pages);
203 203
204 /* This is the shared memory object that backs the GEM resource */ 204 /* This is the shared memory object that backs the GEM resource */
205 inode = gt->gem.filp->f_path.dentry->d_inode; 205 inode = file_inode(gt->gem.filp);
206 mapping = inode->i_mapping; 206 mapping = inode->i_mapping;
207 207
208 gt->pages = kmalloc(pages * sizeof(struct page *), GFP_KERNEL); 208 gt->pages = kmalloc(pages * sizeof(struct page *), GFP_KERNEL);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8febea6daa08..d7d772b30f1a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1635,7 +1635,7 @@ i915_gem_object_truncate(struct drm_i915_gem_object *obj)
1635 * To do this we must instruct the shmfs to drop all of its 1635 * To do this we must instruct the shmfs to drop all of its
1636 * backing pages, *now*. 1636 * backing pages, *now*.
1637 */ 1637 */
1638 inode = obj->base.filp->f_path.dentry->d_inode; 1638 inode = file_inode(obj->base.filp);
1639 shmem_truncate_range(inode, 0, (loff_t)-1); 1639 shmem_truncate_range(inode, 0, (loff_t)-1);
1640 1640
1641 obj->madv = __I915_MADV_PURGED; 1641 obj->madv = __I915_MADV_PURGED;
@@ -1800,7 +1800,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
1800 * 1800 *
1801 * Fail silently without starting the shrinker 1801 * Fail silently without starting the shrinker
1802 */ 1802 */
1803 mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; 1803 mapping = file_inode(obj->base.filp)->i_mapping;
1804 gfp = mapping_gfp_mask(mapping); 1804 gfp = mapping_gfp_mask(mapping);
1805 gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD; 1805 gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD;
1806 gfp &= ~(__GFP_IO | __GFP_WAIT); 1806 gfp &= ~(__GFP_IO | __GFP_WAIT);
@@ -3724,7 +3724,7 @@ struct drm_i915_gem_object *i915_gem_alloc_object(struct drm_device *dev,
3724 mask |= __GFP_DMA32; 3724 mask |= __GFP_DMA32;
3725 } 3725 }
3726 3726
3727 mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; 3727 mapping = file_inode(obj->base.filp)->i_mapping;
3728 mapping_set_gfp_mask(mapping, mask); 3728 mapping_set_gfp_mask(mapping, mask);
3729 3729
3730 i915_gem_object_init(obj, &i915_gem_object_ops); 3730 i915_gem_object_init(obj, &i915_gem_object_ops);
@@ -4228,7 +4228,7 @@ void i915_gem_free_all_phys_object(struct drm_device *dev)
4228void i915_gem_detach_phys_object(struct drm_device *dev, 4228void i915_gem_detach_phys_object(struct drm_device *dev,
4229 struct drm_i915_gem_object *obj) 4229 struct drm_i915_gem_object *obj)
4230{ 4230{
4231 struct address_space *mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; 4231 struct address_space *mapping = file_inode(obj->base.filp)->i_mapping;
4232 char *vaddr; 4232 char *vaddr;
4233 int i; 4233 int i;
4234 int page_count; 4234 int page_count;
@@ -4264,7 +4264,7 @@ i915_gem_attach_phys_object(struct drm_device *dev,
4264 int id, 4264 int id,
4265 int align) 4265 int align)
4266{ 4266{
4267 struct address_space *mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; 4267 struct address_space *mapping = file_inode(obj->base.filp)->i_mapping;
4268 drm_i915_private_t *dev_priv = dev->dev_private; 4268 drm_i915_private_t *dev_priv = dev->dev_private;
4269 int ret = 0; 4269 int ret = 0;
4270 int page_count; 4270 int page_count;
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 7d759a430294..5e93a52d4f2c 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -296,7 +296,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
296 swap_storage = ttm->swap_storage; 296 swap_storage = ttm->swap_storage;
297 BUG_ON(swap_storage == NULL); 297 BUG_ON(swap_storage == NULL);
298 298
299 swap_space = swap_storage->f_path.dentry->d_inode->i_mapping; 299 swap_space = file_inode(swap_storage)->i_mapping;
300 300
301 for (i = 0; i < ttm->num_pages; ++i) { 301 for (i = 0; i < ttm->num_pages; ++i) {
302 from_page = shmem_read_mapping_page(swap_space, i); 302 from_page = shmem_read_mapping_page(swap_space, i);
@@ -345,7 +345,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
345 } else 345 } else
346 swap_storage = persistent_swap_storage; 346 swap_storage = persistent_swap_storage;
347 347
348 swap_space = swap_storage->f_path.dentry->d_inode->i_mapping; 348 swap_space = file_inode(swap_storage)->i_mapping;
349 349
350 for (i = 0; i < ttm->num_pages; ++i) { 350 for (i = 0; i < ttm->num_pages; ++i) {
351 from_page = ttm->pages[i]; 351 from_page = ttm->pages[i];
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index afd212c99216..3816270ba49b 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers/gpu/drm/udl/udl_gem.c
@@ -137,7 +137,7 @@ static int udl_gem_get_pages(struct udl_gem_object *obj, gfp_t gfpmask)
137 if (obj->pages == NULL) 137 if (obj->pages == NULL)
138 return -ENOMEM; 138 return -ENOMEM;
139 139
140 inode = obj->base.filp->f_path.dentry->d_inode; 140 inode = file_inode(obj->base.filp);
141 mapping = inode->i_mapping; 141 mapping = inode->i_mapping;
142 gfpmask |= mapping_gfp_mask(mapping); 142 gfpmask |= mapping_gfp_mask(mapping);
143 143
diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c
index b685b04dbf9d..d7437ef5c695 100644
--- a/drivers/hid/hid-roccat.c
+++ b/drivers/hid/hid-roccat.c
@@ -378,7 +378,7 @@ EXPORT_SYMBOL_GPL(roccat_disconnect);
378 378
379static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 379static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
380{ 380{
381 struct inode *inode = file->f_path.dentry->d_inode; 381 struct inode *inode = file_inode(file);
382 struct roccat_device *device; 382 struct roccat_device *device;
383 unsigned int minor = iminor(inode); 383 unsigned int minor = iminor(inode);
384 long retval = 0; 384 long retval = 0;
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 413a73187d33..3ad07a53a229 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -108,7 +108,7 @@ out:
108 * This function is to be called with the minors_lock mutex held */ 108 * This function is to be called with the minors_lock mutex held */
109static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type) 109static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type)
110{ 110{
111 unsigned int minor = iminor(file->f_path.dentry->d_inode); 111 unsigned int minor = iminor(file_inode(file));
112 struct hid_device *dev; 112 struct hid_device *dev;
113 __u8 *buf; 113 __u8 *buf;
114 int ret = 0; 114 int ret = 0;
@@ -176,7 +176,7 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t
176 * mutex held. */ 176 * mutex held. */
177static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type) 177static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type)
178{ 178{
179 unsigned int minor = iminor(file->f_path.dentry->d_inode); 179 unsigned int minor = iminor(file_inode(file));
180 struct hid_device *dev; 180 struct hid_device *dev;
181 __u8 *buf; 181 __u8 *buf;
182 int ret = 0, len; 182 int ret = 0, len;
@@ -340,7 +340,7 @@ unlock:
340static long hidraw_ioctl(struct file *file, unsigned int cmd, 340static long hidraw_ioctl(struct file *file, unsigned int cmd,
341 unsigned long arg) 341 unsigned long arg)
342{ 342{
343 struct inode *inode = file->f_path.dentry->d_inode; 343 struct inode *inode = file_inode(file);
344 unsigned int minor = iminor(inode); 344 unsigned int minor = iminor(inode);
345 long ret = 0; 345 long ret = 0;
346 struct hidraw *dev; 346 struct hidraw *dev;
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 5ec2261574ec..c3ccdea3d180 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -148,7 +148,7 @@ static ssize_t i2cdev_read(struct file *file, char __user *buf, size_t count,
148 return -ENOMEM; 148 return -ENOMEM;
149 149
150 pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n", 150 pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n",
151 iminor(file->f_path.dentry->d_inode), count); 151 iminor(file_inode(file)), count);
152 152
153 ret = i2c_master_recv(client, tmp, count); 153 ret = i2c_master_recv(client, tmp, count);
154 if (ret >= 0) 154 if (ret >= 0)
@@ -172,7 +172,7 @@ static ssize_t i2cdev_write(struct file *file, const char __user *buf,
172 return PTR_ERR(tmp); 172 return PTR_ERR(tmp);
173 173
174 pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n", 174 pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n",
175 iminor(file->f_path.dentry->d_inode), count); 175 iminor(file_inode(file)), count);
176 176
177 ret = i2c_master_send(client, tmp, count); 177 ret = i2c_master_send(client, tmp, count);
178 kfree(tmp); 178 kfree(tmp);
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index a3133d7b2a0c..2abcc4790f12 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -333,7 +333,7 @@ static int ide_settings_proc_open(struct inode *inode, struct file *file)
333static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer, 333static ssize_t ide_settings_proc_write(struct file *file, const char __user *buffer,
334 size_t count, loff_t *pos) 334 size_t count, loff_t *pos)
335{ 335{
336 ide_drive_t *drive = (ide_drive_t *) PDE(file->f_path.dentry->d_inode)->data; 336 ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data;
337 char name[MAX_LEN + 1]; 337 char name[MAX_LEN + 1];
338 int for_real = 0, mul_factor, div_factor; 338 int for_real = 0, mul_factor, div_factor;
339 unsigned long n; 339 unsigned long n;
@@ -558,7 +558,7 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
558static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer, 558static ssize_t ide_driver_proc_write(struct file *file, const char __user *buffer,
559 size_t count, loff_t *pos) 559 size_t count, loff_t *pos)
560{ 560{
561 ide_drive_t *drive = (ide_drive_t *) PDE(file->f_path.dentry->d_inode)->data; 561 ide_drive_t *drive = (ide_drive_t *) PDE(file_inode(file))->data;
562 char name[32]; 562 char name[32];
563 563
564 if (!capable(CAP_SYS_ADMIN)) 564 if (!capable(CAP_SYS_ADMIN))
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 0cb0007724a2..792e7e9b376f 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -730,7 +730,7 @@ ssize_t ib_uverbs_open_xrcd(struct ib_uverbs_file *file,
730 goto err_tree_mutex_unlock; 730 goto err_tree_mutex_unlock;
731 } 731 }
732 732
733 inode = f.file->f_path.dentry->d_inode; 733 inode = file_inode(f.file);
734 xrcd = find_xrcd(file->device, inode); 734 xrcd = find_xrcd(file->device, inode);
735 if (!xrcd && !(cmd.oflags & O_CREAT)) { 735 if (!xrcd && !(cmd.oflags & O_CREAT)) {
736 /* no file descriptor. Need CREATE flag */ 736 /* no file descriptor. Need CREATE flag */
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 3eb7e454849b..aed8afee56da 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -1864,9 +1864,9 @@ static int ipath_assign_port(struct file *fp,
1864 goto done_chk_sdma; 1864 goto done_chk_sdma;
1865 } 1865 }
1866 1866
1867 i_minor = iminor(fp->f_path.dentry->d_inode) - IPATH_USER_MINOR_BASE; 1867 i_minor = iminor(file_inode(fp)) - IPATH_USER_MINOR_BASE;
1868 ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n", 1868 ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n",
1869 (long)fp->f_path.dentry->d_inode->i_rdev, i_minor); 1869 (long)file_inode(fp)->i_rdev, i_minor);
1870 1870
1871 if (i_minor) 1871 if (i_minor)
1872 ret = find_free_port(i_minor - 1, fp, uinfo); 1872 ret = find_free_port(i_minor - 1, fp, uinfo);
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index a4de9d58e9b4..a479375a8fd8 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -113,7 +113,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
113 struct infinipath_counters counters; 113 struct infinipath_counters counters;
114 struct ipath_devdata *dd; 114 struct ipath_devdata *dd;
115 115
116 dd = file->f_path.dentry->d_inode->i_private; 116 dd = file_inode(file)->i_private;
117 dd->ipath_f_read_counters(dd, &counters); 117 dd->ipath_f_read_counters(dd, &counters);
118 118
119 return simple_read_from_buffer(buf, count, ppos, &counters, 119 return simple_read_from_buffer(buf, count, ppos, &counters,
@@ -154,7 +154,7 @@ static ssize_t flash_read(struct file *file, char __user *buf,
154 goto bail; 154 goto bail;
155 } 155 }
156 156
157 dd = file->f_path.dentry->d_inode->i_private; 157 dd = file_inode(file)->i_private;
158 if (ipath_eeprom_read(dd, pos, tmp, count)) { 158 if (ipath_eeprom_read(dd, pos, tmp, count)) {
159 ipath_dev_err(dd, "failed to read from flash\n"); 159 ipath_dev_err(dd, "failed to read from flash\n");
160 ret = -ENXIO; 160 ret = -ENXIO;
@@ -207,7 +207,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
207 goto bail_tmp; 207 goto bail_tmp;
208 } 208 }
209 209
210 dd = file->f_path.dentry->d_inode->i_private; 210 dd = file_inode(file)->i_private;
211 if (ipath_eeprom_write(dd, pos, tmp, count)) { 211 if (ipath_eeprom_write(dd, pos, tmp, count)) {
212 ret = -ENXIO; 212 ret = -ENXIO;
213 ipath_dev_err(dd, "failed to write to flash\n"); 213 ipath_dev_err(dd, "failed to write to flash\n");
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 959a5c4ff812..4f7aa301b3b1 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -1524,7 +1524,7 @@ static int qib_assign_ctxt(struct file *fp, const struct qib_user_info *uinfo)
1524 } 1524 }
1525 } 1525 }
1526 1526
1527 i_minor = iminor(fp->f_dentry->d_inode) - QIB_USER_MINOR_BASE; 1527 i_minor = iminor(file_inode(fp)) - QIB_USER_MINOR_BASE;
1528 if (i_minor) 1528 if (i_minor)
1529 ret = find_free_ctxt(i_minor - 1, fp, uinfo); 1529 ret = find_free_ctxt(i_minor - 1, fp, uinfo);
1530 else 1530 else
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 65a2a23f6f8a..644bd6f6467c 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -45,7 +45,7 @@
45 45
46static struct super_block *qib_super; 46static struct super_block *qib_super;
47 47
48#define private2dd(file) ((file)->f_dentry->d_inode->i_private) 48#define private2dd(file) (file_inode(file)->i_private)
49 49
50static int qibfs_mknod(struct inode *dir, struct dentry *dentry, 50static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
51 umode_t mode, const struct file_operations *fops, 51 umode_t mode, const struct file_operations *fops,
@@ -171,7 +171,7 @@ static const struct file_operations cntr_ops[] = {
171}; 171};
172 172
173/* 173/*
174 * Could use file->f_dentry->d_inode->i_ino to figure out which file, 174 * Could use file_inode(file)->i_ino to figure out which file,
175 * instead of separate routine for each, but for now, this works... 175 * instead of separate routine for each, but for now, this works...
176 */ 176 */
177 177
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index fc178893789a..7db150ca163e 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -964,7 +964,6 @@ static ssize_t smmu_debugfs_stats_write(struct file *file,
964{ 964{
965 struct smmu_debugfs_info *info; 965 struct smmu_debugfs_info *info;
966 struct smmu_device *smmu; 966 struct smmu_device *smmu;
967 struct dentry *dent;
968 int i; 967 int i;
969 enum { 968 enum {
970 _OFF = 0, 969 _OFF = 0,
@@ -992,8 +991,7 @@ static ssize_t smmu_debugfs_stats_write(struct file *file,
992 if (i == ARRAY_SIZE(command)) 991 if (i == ARRAY_SIZE(command))
993 return -EINVAL; 992 return -EINVAL;
994 993
995 dent = file->f_dentry; 994 info = file_inode(file)->i_private;
996 info = dent->d_inode->i_private;
997 smmu = info->smmu; 995 smmu = info->smmu;
998 996
999 offs = SMMU_CACHE_CONFIG(info->cache); 997 offs = SMMU_CACHE_CONFIG(info->cache);
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index af4fd3d036c1..3a4165c61196 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -145,7 +145,7 @@ void remove_divas_proc(void)
145static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer, 145static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer,
146 size_t count, loff_t *pos) 146 size_t count, loff_t *pos)
147{ 147{
148 diva_os_xdi_adapter_t *a = PDE(file->f_path.dentry->d_inode)->data; 148 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data;
149 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 149 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
150 150
151 if ((count == 1) || (count == 2)) { 151 if ((count == 1) || (count == 2)) {
@@ -172,7 +172,7 @@ static ssize_t grp_opt_proc_write(struct file *file, const char __user *buffer,
172static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer, 172static ssize_t d_l1_down_proc_write(struct file *file, const char __user *buffer,
173 size_t count, loff_t *pos) 173 size_t count, loff_t *pos)
174{ 174{
175 diva_os_xdi_adapter_t *a = PDE(file->f_path.dentry->d_inode)->data; 175 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data;
176 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 176 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
177 177
178 if ((count == 1) || (count == 2)) { 178 if ((count == 1) || (count == 2)) {
@@ -251,7 +251,7 @@ static const struct file_operations grp_opt_proc_fops = {
251static ssize_t info_proc_write(struct file *file, const char __user *buffer, 251static ssize_t info_proc_write(struct file *file, const char __user *buffer,
252 size_t count, loff_t *pos) 252 size_t count, loff_t *pos)
253{ 253{
254 diva_os_xdi_adapter_t *a = PDE(file->f_path.dentry->d_inode)->data; 254 diva_os_xdi_adapter_t *a = PDE(file_inode(file))->data;
255 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1]; 255 PISDN_ADAPTER IoAdapter = IoAdapters[a->controller - 1];
256 char c[4]; 256 char c[4];
257 257
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 88e4f0ee073c..9a3ce93665c5 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -173,7 +173,7 @@ hysdn_log_read(struct file *file, char __user *buf, size_t count, loff_t *off)
173{ 173{
174 struct log_data *inf; 174 struct log_data *inf;
175 int len; 175 int len;
176 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 176 struct proc_dir_entry *pde = PDE(file_inode(file));
177 struct procdata *pd = NULL; 177 struct procdata *pd = NULL;
178 hysdn_card *card; 178 hysdn_card *card;
179 179
@@ -319,7 +319,7 @@ static unsigned int
319hysdn_log_poll(struct file *file, poll_table *wait) 319hysdn_log_poll(struct file *file, poll_table *wait)
320{ 320{
321 unsigned int mask = 0; 321 unsigned int mask = 0;
322 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 322 struct proc_dir_entry *pde = PDE(file_inode(file));
323 hysdn_card *card; 323 hysdn_card *card;
324 struct procdata *pd = NULL; 324 struct procdata *pd = NULL;
325 325
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index e2a945ee9f05..32049ed2f24c 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1058,7 +1058,7 @@ isdn_info_update(void)
1058static ssize_t 1058static ssize_t
1059isdn_read(struct file *file, char __user *buf, size_t count, loff_t *off) 1059isdn_read(struct file *file, char __user *buf, size_t count, loff_t *off)
1060{ 1060{
1061 uint minor = iminor(file->f_path.dentry->d_inode); 1061 uint minor = iminor(file_inode(file));
1062 int len = 0; 1062 int len = 0;
1063 int drvidx; 1063 int drvidx;
1064 int chidx; 1064 int chidx;
@@ -1165,7 +1165,7 @@ out:
1165static ssize_t 1165static ssize_t
1166isdn_write(struct file *file, const char __user *buf, size_t count, loff_t *off) 1166isdn_write(struct file *file, const char __user *buf, size_t count, loff_t *off)
1167{ 1167{
1168 uint minor = iminor(file->f_path.dentry->d_inode); 1168 uint minor = iminor(file_inode(file));
1169 int drvidx; 1169 int drvidx;
1170 int chidx; 1170 int chidx;
1171 int retval; 1171 int retval;
@@ -1228,7 +1228,7 @@ static unsigned int
1228isdn_poll(struct file *file, poll_table *wait) 1228isdn_poll(struct file *file, poll_table *wait)
1229{ 1229{
1230 unsigned int mask = 0; 1230 unsigned int mask = 0;
1231 unsigned int minor = iminor(file->f_path.dentry->d_inode); 1231 unsigned int minor = iminor(file_inode(file));
1232 int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); 1232 int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
1233 1233
1234 mutex_lock(&isdn_mutex); 1234 mutex_lock(&isdn_mutex);
@@ -1269,7 +1269,7 @@ out:
1269static int 1269static int
1270isdn_ioctl(struct file *file, uint cmd, ulong arg) 1270isdn_ioctl(struct file *file, uint cmd, ulong arg)
1271{ 1271{
1272 uint minor = iminor(file->f_path.dentry->d_inode); 1272 uint minor = iminor(file_inode(file));
1273 isdn_ctrl c; 1273 isdn_ctrl c;
1274 int drvidx; 1274 int drvidx;
1275 int ret; 1275 int ret;
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index 61d78fa03b1a..38ceac5053a0 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -668,7 +668,7 @@ isdn_ppp_poll(struct file *file, poll_table *wait)
668 668
669 if (is->debug & 0x2) 669 if (is->debug & 0x2)
670 printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n", 670 printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n",
671 iminor(file->f_path.dentry->d_inode)); 671 iminor(file_inode(file)));
672 672
673 /* just registers wait_queue hook. This doesn't really wait. */ 673 /* just registers wait_queue hook. This doesn't really wait. */
674 poll_wait(file, &is->wq, wait); 674 poll_wait(file, &is->wq, wait);
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 7155945f8eb8..4fd9d6aeff6a 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -337,7 +337,7 @@ static int read_page(struct file *file, unsigned long index,
337 struct page *page) 337 struct page *page)
338{ 338{
339 int ret = 0; 339 int ret = 0;
340 struct inode *inode = file->f_path.dentry->d_inode; 340 struct inode *inode = file_inode(file);
341 struct buffer_head *bh; 341 struct buffer_head *bh;
342 sector_t block; 342 sector_t block;
343 343
@@ -755,7 +755,7 @@ static void bitmap_file_unmap(struct bitmap_storage *store)
755 free_buffers(sb_page); 755 free_buffers(sb_page);
756 756
757 if (file) { 757 if (file) {
758 struct inode *inode = file->f_path.dentry->d_inode; 758 struct inode *inode = file_inode(file);
759 invalidate_mapping_pages(inode->i_mapping, 0, -1); 759 invalidate_mapping_pages(inode->i_mapping, 0, -1);
760 fput(file); 760 fput(file);
761 } 761 }
diff --git a/drivers/media/pci/zoran/zoran_procfs.c b/drivers/media/pci/zoran/zoran_procfs.c
index f1423b777db1..e084b0a21b1b 100644
--- a/drivers/media/pci/zoran/zoran_procfs.c
+++ b/drivers/media/pci/zoran/zoran_procfs.c
@@ -137,7 +137,7 @@ static int zoran_open(struct inode *inode, struct file *file)
137static ssize_t zoran_write(struct file *file, const char __user *buffer, 137static ssize_t zoran_write(struct file *file, const char __user *buffer,
138 size_t count, loff_t *ppos) 138 size_t count, loff_t *ppos)
139{ 139{
140 struct zoran *zr = PDE(file->f_path.dentry->d_inode)->data; 140 struct zoran *zr = PDE(file_inode(file))->data;
141 char *string, *sp; 141 char *string, *sp;
142 char *line, *ldelim, *varname, *svar, *tdelim; 142 char *line, *ldelim, *varname, *svar, *tdelim;
143 143
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index ca12d3289bfe..35002367485c 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -531,7 +531,7 @@ EXPORT_SYMBOL(lirc_dev_fop_close);
531 531
532unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) 532unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
533{ 533{
534 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 534 struct irctl *ir = irctls[iminor(file_inode(file))];
535 unsigned int ret; 535 unsigned int ret;
536 536
537 if (!ir) { 537 if (!ir) {
@@ -565,7 +565,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
565{ 565{
566 __u32 mode; 566 __u32 mode;
567 int result = 0; 567 int result = 0;
568 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 568 struct irctl *ir = irctls[iminor(file_inode(file))];
569 569
570 if (!ir) { 570 if (!ir) {
571 printk(KERN_ERR "lirc_dev: %s: no irctl found!\n", __func__); 571 printk(KERN_ERR "lirc_dev: %s: no irctl found!\n", __func__);
@@ -650,7 +650,7 @@ ssize_t lirc_dev_fop_read(struct file *file,
650 size_t length, 650 size_t length,
651 loff_t *ppos) 651 loff_t *ppos)
652{ 652{
653 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 653 struct irctl *ir = irctls[iminor(file_inode(file))];
654 unsigned char *buf; 654 unsigned char *buf;
655 int ret = 0, written = 0; 655 int ret = 0, written = 0;
656 DECLARE_WAITQUEUE(wait, current); 656 DECLARE_WAITQUEUE(wait, current);
@@ -754,10 +754,10 @@ void *lirc_get_pdata(struct file *file)
754{ 754{
755 void *data = NULL; 755 void *data = NULL;
756 756
757 if (file && file->f_dentry && file->f_dentry->d_inode && 757 if (file && file->f_dentry && file_inode(file) &&
758 file->f_dentry->d_inode->i_rdev) { 758 file_inode(file)->i_rdev) {
759 struct irctl *ir; 759 struct irctl *ir;
760 ir = irctls[iminor(file->f_dentry->d_inode)]; 760 ir = irctls[iminor(file_inode(file))];
761 data = ir->d.data; 761 data = ir->d.data;
762 } 762 }
763 763
@@ -769,7 +769,7 @@ EXPORT_SYMBOL(lirc_get_pdata);
769ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer, 769ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer,
770 size_t length, loff_t *ppos) 770 size_t length, loff_t *ppos)
771{ 771{
772 struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; 772 struct irctl *ir = irctls[iminor(file_inode(file))];
773 773
774 if (!ir) { 774 if (!ir) {
775 printk(KERN_ERR "%s: called with invalid irctl\n", __func__); 775 printk(KERN_ERR "%s: called with invalid irctl\n", __func__);
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 98dcad9c8a3b..870de1d5667a 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -222,7 +222,7 @@ static struct class video_class = {
222 222
223struct video_device *video_devdata(struct file *file) 223struct video_device *video_devdata(struct file *file)
224{ 224{
225 return video_device[iminor(file->f_path.dentry->d_inode)]; 225 return video_device[iminor(file_inode(file))];
226} 226}
227EXPORT_SYMBOL(video_devdata); 227EXPORT_SYMBOL(video_devdata);
228 228
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index dfcc65b33e99..4f02848bb2bc 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -194,7 +194,7 @@ static int vol_cdev_fsync(struct file *file, loff_t start, loff_t end,
194{ 194{
195 struct ubi_volume_desc *desc = file->private_data; 195 struct ubi_volume_desc *desc = file->private_data;
196 struct ubi_device *ubi = desc->vol->ubi; 196 struct ubi_device *ubi = desc->vol->ubi;
197 struct inode *inode = file->f_path.dentry->d_inode; 197 struct inode *inode = file_inode(file);
198 int err; 198 int err;
199 mutex_lock(&inode->i_mutex); 199 mutex_lock(&inode->i_mutex);
200 err = ubi_sync(ubi->ubi_num); 200 err = ubi_sync(ubi->ubi_num);
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index f0718e1a8369..8fb1ccfe74dc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2336,7 +2336,7 @@ static ssize_t mem_read(struct file *file, char __user *buf, size_t count,
2336 loff_t *ppos) 2336 loff_t *ppos)
2337{ 2337{
2338 loff_t pos = *ppos; 2338 loff_t pos = *ppos;
2339 loff_t avail = file->f_path.dentry->d_inode->i_size; 2339 loff_t avail = file_inode(file)->i_size;
2340 unsigned int mem = (uintptr_t)file->private_data & 3; 2340 unsigned int mem = (uintptr_t)file->private_data & 3;
2341 struct adapter *adap = file->private_data - mem; 2341 struct adapter *adap = file->private_data - mem;
2342 2342
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)
939 int ret = 0; 939 int ret = 0;
940 940
941 mutex_lock(&cosa_chardev_mutex); 941 mutex_lock(&cosa_chardev_mutex);
942 if ((n=iminor(file->f_path.dentry->d_inode)>>CARD_MINOR_BITS) 942 if ((n=iminor(file_inode(file))>>CARD_MINOR_BITS)
943 >= nr_cards) { 943 >= nr_cards) {
944 ret = -ENODEV; 944 ret = -ENODEV;
945 goto out; 945 goto out;
946 } 946 }
947 cosa = cosa_cards+n; 947 cosa = cosa_cards+n;
948 948
949 if ((n=iminor(file->f_path.dentry->d_inode) 949 if ((n=iminor(file_inode(file))
950 & ((1<<CARD_MINOR_BITS)-1)) >= cosa->nchannels) { 950 & ((1<<CARD_MINOR_BITS)-1)) >= cosa->nchannels) {
951 ret = -ENODEV; 951 ret = -ENODEV;
952 goto out; 952 goto out;
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 598ca1cafb95..5311ba1dcd2c 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2769,7 +2769,7 @@ static ssize_t int_proc_write(struct file *file, const char __user *buffer,
2769 nr = nr * 10 + c; 2769 nr = nr * 10 + c;
2770 p++; 2770 p++;
2771 } while (--len); 2771 } while (--len);
2772 *(int *)PDE(file->f_path.dentry->d_inode)->data = nr; 2772 *(int *)PDE(file_inode(file))->data = nr;
2773 return count; 2773 return count;
2774} 2774}
2775 2775
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index f2f501e5b6a0..d4d800c54d86 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -179,7 +179,7 @@ static int led_proc_open(struct inode *inode, struct file *file)
179static ssize_t led_proc_write(struct file *file, const char *buf, 179static ssize_t led_proc_write(struct file *file, const char *buf,
180 size_t count, loff_t *pos) 180 size_t count, loff_t *pos)
181{ 181{
182 void *data = PDE(file->f_path.dentry->d_inode)->data; 182 void *data = PDE(file_inode(file))->data;
183 char *cur, lbuf[32]; 183 char *cur, lbuf[32];
184 int d; 184 int d;
185 185
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 9b8505ccc56d..0b009470e6db 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -21,7 +21,7 @@ static loff_t
21proc_bus_pci_lseek(struct file *file, loff_t off, int whence) 21proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
22{ 22{
23 loff_t new = -1; 23 loff_t new = -1;
24 struct inode *inode = file->f_path.dentry->d_inode; 24 struct inode *inode = file_inode(file);
25 25
26 mutex_lock(&inode->i_mutex); 26 mutex_lock(&inode->i_mutex);
27 switch (whence) { 27 switch (whence) {
@@ -46,7 +46,7 @@ proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
46static ssize_t 46static ssize_t
47proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) 47proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
48{ 48{
49 const struct inode *ino = file->f_path.dentry->d_inode; 49 const struct inode *ino = file_inode(file);
50 const struct proc_dir_entry *dp = PDE(ino); 50 const struct proc_dir_entry *dp = PDE(ino);
51 struct pci_dev *dev = dp->data; 51 struct pci_dev *dev = dp->data;
52 unsigned int pos = *ppos; 52 unsigned int pos = *ppos;
@@ -132,7 +132,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
132static ssize_t 132static ssize_t
133proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) 133proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos)
134{ 134{
135 struct inode *ino = file->f_path.dentry->d_inode; 135 struct inode *ino = file_inode(file);
136 const struct proc_dir_entry *dp = PDE(ino); 136 const struct proc_dir_entry *dp = PDE(ino);
137 struct pci_dev *dev = dp->data; 137 struct pci_dev *dev = dp->data;
138 int pos = *ppos; 138 int pos = *ppos;
@@ -212,7 +212,7 @@ struct pci_filp_private {
212static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, 212static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
213 unsigned long arg) 213 unsigned long arg)
214{ 214{
215 const struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); 215 const struct proc_dir_entry *dp = PDE(file_inode(file));
216 struct pci_dev *dev = dp->data; 216 struct pci_dev *dev = dp->data;
217#ifdef HAVE_PCI_MMAP 217#ifdef HAVE_PCI_MMAP
218 struct pci_filp_private *fpriv = file->private_data; 218 struct pci_filp_private *fpriv = file->private_data;
@@ -253,7 +253,7 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
253#ifdef HAVE_PCI_MMAP 253#ifdef HAVE_PCI_MMAP
254static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) 254static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
255{ 255{
256 struct inode *inode = file->f_path.dentry->d_inode; 256 struct inode *inode = file_inode(file);
257 const struct proc_dir_entry *dp = PDE(inode); 257 const struct proc_dir_entry *dp = PDE(inode);
258 struct pci_dev *dev = dp->data; 258 struct pci_dev *dev = dp->data;
259 struct pci_filp_private *fpriv = file->private_data; 259 struct pci_filp_private *fpriv = file->private_data;
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index b8ad71f7863f..8853d013a716 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -3566,7 +3566,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
3566 } 3566 }
3567 3567
3568 if (ret > 0) { 3568 if (ret > 0) {
3569 struct inode *inode = file->f_path.dentry->d_inode; 3569 struct inode *inode = file_inode(file);
3570 inode->i_atime = current_fs_time(inode->i_sb); 3570 inode->i_atime = current_fs_time(inode->i_sb);
3571 } 3571 }
3572 3572
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index f946ca7cb762..05dfd569d912 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -852,7 +852,7 @@ static ssize_t dispatch_proc_write(struct file *file,
852 const char __user *userbuf, 852 const char __user *userbuf,
853 size_t count, loff_t *pos) 853 size_t count, loff_t *pos)
854{ 854{
855 struct ibm_struct *ibm = PDE(file->f_path.dentry->d_inode)->data; 855 struct ibm_struct *ibm = PDE(file_inode(file))->data;
856 char *kernbuf; 856 char *kernbuf;
857 int ret; 857 int ret;
858 858
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index c2727895794c..6fba80ad3bca 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -583,7 +583,7 @@ static int set_lcd_status(struct backlight_device *bd)
583static ssize_t lcd_proc_write(struct file *file, const char __user *buf, 583static ssize_t lcd_proc_write(struct file *file, const char __user *buf,
584 size_t count, loff_t *pos) 584 size_t count, loff_t *pos)
585{ 585{
586 struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; 586 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
587 char cmd[42]; 587 char cmd[42];
588 size_t len; 588 size_t len;
589 int value; 589 int value;
@@ -650,7 +650,7 @@ static int video_proc_open(struct inode *inode, struct file *file)
650static ssize_t video_proc_write(struct file *file, const char __user *buf, 650static ssize_t video_proc_write(struct file *file, const char __user *buf,
651 size_t count, loff_t *pos) 651 size_t count, loff_t *pos)
652{ 652{
653 struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; 653 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
654 char *cmd, *buffer; 654 char *cmd, *buffer;
655 int ret; 655 int ret;
656 int value; 656 int value;
@@ -750,7 +750,7 @@ static int fan_proc_open(struct inode *inode, struct file *file)
750static ssize_t fan_proc_write(struct file *file, const char __user *buf, 750static ssize_t fan_proc_write(struct file *file, const char __user *buf,
751 size_t count, loff_t *pos) 751 size_t count, loff_t *pos)
752{ 752{
753 struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; 753 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
754 char cmd[42]; 754 char cmd[42];
755 size_t len; 755 size_t len;
756 int value; 756 int value;
@@ -822,7 +822,7 @@ static int keys_proc_open(struct inode *inode, struct file *file)
822static ssize_t keys_proc_write(struct file *file, const char __user *buf, 822static ssize_t keys_proc_write(struct file *file, const char __user *buf,
823 size_t count, loff_t *pos) 823 size_t count, loff_t *pos)
824{ 824{
825 struct toshiba_acpi_dev *dev = PDE(file->f_path.dentry->d_inode)->data; 825 struct toshiba_acpi_dev *dev = PDE(file_inode(file))->data;
826 char cmd[42]; 826 char cmd[42];
827 size_t len; 827 size_t len;
828 int value; 828 int value;
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 315b3112aca8..65f735ac6b3b 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -30,7 +30,7 @@ static struct proc_dir_entry *isapnp_proc_bus_dir = NULL;
30static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) 30static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
31{ 31{
32 loff_t new = -1; 32 loff_t new = -1;
33 struct inode *inode = file->f_path.dentry->d_inode; 33 struct inode *inode = file_inode(file);
34 34
35 mutex_lock(&inode->i_mutex); 35 mutex_lock(&inode->i_mutex);
36 switch (whence) { 36 switch (whence) {
@@ -55,7 +55,7 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, 55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf,
56 size_t nbytes, loff_t * ppos) 56 size_t nbytes, loff_t * ppos)
57{ 57{
58 struct inode *ino = file->f_path.dentry->d_inode; 58 struct inode *ino = file_inode(file);
59 struct proc_dir_entry *dp = PDE(ino); 59 struct proc_dir_entry *dp = PDE(ino);
60 struct pnp_dev *dev = dp->data; 60 struct pnp_dev *dev = dp->data;
61 int pos = *ppos; 61 int pos = *ppos;
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index bc89f392a629..63ddb0173456 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -244,7 +244,7 @@ static int pnpbios_proc_open(struct inode *inode, struct file *file)
244static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, 244static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf,
245 size_t count, loff_t *pos) 245 size_t count, loff_t *pos)
246{ 246{
247 void *data = PDE(file->f_path.dentry->d_inode)->data; 247 void *data = PDE(file_inode(file))->data;
248 struct pnp_bios_node *node; 248 struct pnp_bios_node *node;
249 int boot = (long)data >> 8; 249 int boot = (long)data >> 8;
250 u8 nodenum = (long)data; 250 u8 nodenum = (long)data;
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index 911704571b9c..5acdc5f7dae8 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -433,9 +433,9 @@ fs3270_open(struct inode *inode, struct file *filp)
433 struct idal_buffer *ib; 433 struct idal_buffer *ib;
434 int minor, rc = 0; 434 int minor, rc = 0;
435 435
436 if (imajor(filp->f_path.dentry->d_inode) != IBM_FS3270_MAJOR) 436 if (imajor(file_inode(filp)) != IBM_FS3270_MAJOR)
437 return -ENODEV; 437 return -ENODEV;
438 minor = iminor(filp->f_path.dentry->d_inode); 438 minor = iminor(file_inode(filp));
439 /* Check for minor 0 multiplexer. */ 439 /* Check for minor 0 multiplexer. */
440 if (minor == 0) { 440 if (minor == 0) {
441 struct tty_struct *tty = get_current_tty(); 441 struct tty_struct *tty = get_current_tty();
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c
index 2d61db3fc62a..6dc60725de92 100644
--- a/drivers/s390/char/tape_char.c
+++ b/drivers/s390/char/tape_char.c
@@ -273,13 +273,13 @@ tapechar_open (struct inode *inode, struct file *filp)
273 int minor, rc; 273 int minor, rc;
274 274
275 DBF_EVENT(6, "TCHAR:open: %i:%i\n", 275 DBF_EVENT(6, "TCHAR:open: %i:%i\n",
276 imajor(filp->f_path.dentry->d_inode), 276 imajor(file_inode(filp)),
277 iminor(filp->f_path.dentry->d_inode)); 277 iminor(file_inode(filp)));
278 278
279 if (imajor(filp->f_path.dentry->d_inode) != tapechar_major) 279 if (imajor(file_inode(filp)) != tapechar_major)
280 return -ENODEV; 280 return -ENODEV;
281 281
282 minor = iminor(filp->f_path.dentry->d_inode); 282 minor = iminor(file_inode(filp));
283 device = tape_find_device(minor / TAPE_MINORS_PER_DEV); 283 device = tape_find_device(minor / TAPE_MINORS_PER_DEV);
284 if (IS_ERR(device)) { 284 if (IS_ERR(device)) {
285 DBF_EVENT(3, "TCHAR:open: tape_find_device() failed\n"); 285 DBF_EVENT(3, "TCHAR:open: tape_find_device() failed\n");
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c
index 483f72ba030d..c180e3135b3b 100644
--- a/drivers/s390/char/vmur.c
+++ b/drivers/s390/char/vmur.c
@@ -703,7 +703,7 @@ static int ur_open(struct inode *inode, struct file *file)
703 * We treat the minor number as the devno of the ur device 703 * We treat the minor number as the devno of the ur device
704 * to find in the driver tree. 704 * to find in the driver tree.
705 */ 705 */
706 devno = MINOR(file->f_dentry->d_inode->i_rdev); 706 devno = MINOR(file_inode(file)->i_rdev);
707 707
708 urd = urdev_get_from_devno(devno); 708 urd = urdev_get_from_devno(devno);
709 if (!urd) { 709 if (!urd) {
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c
index e6e0d31c02ac..749b72739c4a 100644
--- a/drivers/s390/cio/qdio_debug.c
+++ b/drivers/s390/cio/qdio_debug.c
@@ -128,7 +128,7 @@ static int qstat_show(struct seq_file *m, void *v)
128static int qstat_seq_open(struct inode *inode, struct file *filp) 128static int qstat_seq_open(struct inode *inode, struct file *filp)
129{ 129{
130 return single_open(filp, qstat_show, 130 return single_open(filp, qstat_show,
131 filp->f_path.dentry->d_inode->i_private); 131 file_inode(filp)->i_private);
132} 132}
133 133
134static const struct file_operations debugfs_fops = { 134static const struct file_operations debugfs_fops = {
@@ -221,7 +221,7 @@ static ssize_t qperf_seq_write(struct file *file, const char __user *ubuf,
221static int qperf_seq_open(struct inode *inode, struct file *filp) 221static int qperf_seq_open(struct inode *inode, struct file *filp)
222{ 222{
223 return single_open(filp, qperf_show, 223 return single_open(filp, qperf_show,
224 filp->f_path.dentry->d_inode->i_private); 224 file_inode(filp)->i_private);
225} 225}
226 226
227static struct file_operations debugfs_perf_fops = { 227static struct file_operations debugfs_perf_fops = {
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index e85c803b30cd..fc1339cf91ac 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -107,7 +107,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
107 int error = 0; 107 int error = 0;
108 u8 ireg = 0; 108 u8 ireg = 0;
109 109
110 if (D7S_MINOR != iminor(file->f_path.dentry->d_inode)) 110 if (D7S_MINOR != iminor(file_inode(file)))
111 return -ENODEV; 111 return -ENODEV;
112 112
113 mutex_lock(&d7s_mutex); 113 mutex_lock(&d7s_mutex);
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index d1f0120cdb98..5e1e12c0cf42 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -640,7 +640,7 @@ out:
640/* This function handles ioctl for the character device */ 640/* This function handles ioctl for the character device */
641static long twa_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 641static long twa_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
642{ 642{
643 struct inode *inode = file->f_path.dentry->d_inode; 643 struct inode *inode = file_inode(file);
644 long timeout; 644 long timeout;
645 unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0; 645 unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0;
646 dma_addr_t dma_handle; 646 dma_addr_t dma_handle;
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index 52a2f0580d97..c845bdbeb6c0 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -757,7 +757,7 @@ static long twl_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long
757 dma_addr_t dma_handle; 757 dma_addr_t dma_handle;
758 int request_id = 0; 758 int request_id = 0;
759 TW_Ioctl_Driver_Command driver_command; 759 TW_Ioctl_Driver_Command driver_command;
760 struct inode *inode = file->f_dentry->d_inode; 760 struct inode *inode = file_inode(file);
761 TW_Ioctl_Buf_Apache *tw_ioctl; 761 TW_Ioctl_Buf_Apache *tw_ioctl;
762 TW_Command_Full *full_command_packet; 762 TW_Command_Full *full_command_packet;
763 TW_Device_Extension *tw_dev = twl_device_extension_list[iminor(inode)]; 763 TW_Device_Extension *tw_dev = twl_device_extension_list[iminor(inode)];
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 62071d2fc1ce..56662ae03dea 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -889,7 +889,7 @@ static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long a
889 unsigned long flags; 889 unsigned long flags;
890 unsigned int data_buffer_length = 0; 890 unsigned int data_buffer_length = 0;
891 unsigned long data_buffer_length_adjusted = 0; 891 unsigned long data_buffer_length_adjusted = 0;
892 struct inode *inode = file->f_dentry->d_inode; 892 struct inode *inode = file_inode(file);
893 unsigned long *cpu_addr; 893 unsigned long *cpu_addr;
894 long timeout; 894 long timeout;
895 TW_New_Ioctl *tw_ioctl; 895 TW_New_Ioctl *tw_ioctl;
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index b42cbbd3d92d..c323b2030afa 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -71,7 +71,7 @@ static ssize_t
71csio_mem_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 71csio_mem_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
72{ 72{
73 loff_t pos = *ppos; 73 loff_t pos = *ppos;
74 loff_t avail = file->f_path.dentry->d_inode->i_size; 74 loff_t avail = file_inode(file)->i_size;
75 unsigned int mem = (uintptr_t)file->private_data & 3; 75 unsigned int mem = (uintptr_t)file->private_data & 3;
76 struct csio_hw *hw = file->private_data - mem; 76 struct csio_hw *hw = file->private_data - mem;
77 77
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index b4f6c9a84e71..b6e2700ec1c6 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -2161,7 +2161,7 @@ static long adpt_unlocked_ioctl(struct file *file, uint cmd, ulong arg)
2161 struct inode *inode; 2161 struct inode *inode;
2162 long ret; 2162 long ret;
2163 2163
2164 inode = file->f_dentry->d_inode; 2164 inode = file_inode(file);
2165 2165
2166 mutex_lock(&adpt_mutex); 2166 mutex_lock(&adpt_mutex);
2167 ret = adpt_ioctl(inode, file, cmd, arg); 2167 ret = adpt_ioctl(inode, file, cmd, arg);
@@ -2177,7 +2177,7 @@ static long compat_adpt_ioctl(struct file *file,
2177 struct inode *inode; 2177 struct inode *inode;
2178 long ret; 2178 long ret;
2179 2179
2180 inode = file->f_dentry->d_inode; 2180 inode = file_inode(file);
2181 2181
2182 mutex_lock(&adpt_mutex); 2182 mutex_lock(&adpt_mutex);
2183 2183
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 98156a97c472..3e2b3717cb5c 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -977,7 +977,7 @@ static int check_tape(struct scsi_tape *STp, struct file *filp)
977 struct st_modedef *STm; 977 struct st_modedef *STm;
978 struct st_partstat *STps; 978 struct st_partstat *STps;
979 char *name = tape_name(STp); 979 char *name = tape_name(STp);
980 struct inode *inode = filp->f_path.dentry->d_inode; 980 struct inode *inode = file_inode(filp);
981 int mode = TAPE_MODE(inode); 981 int mode = TAPE_MODE(inode);
982 982
983 STp->ready = ST_READY; 983 STp->ready = ST_READY;
diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c
index c92078e7fe86..5d5d95de081e 100644
--- a/drivers/staging/bcm/Misc.c
+++ b/drivers/staging/bcm/Misc.c
@@ -185,7 +185,7 @@ static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, u
185 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Unable to Open %s\n", path); 185 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Unable to Open %s\n", path);
186 return -ENOENT; 186 return -ENOENT;
187 } 187 }
188 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Opened file is = %s and length =0x%lx to be downloaded at =0x%x", path, (unsigned long)flp->f_dentry->d_inode->i_size, loc); 188 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Opened file is = %s and length =0x%lx to be downloaded at =0x%x", path, (unsigned long)file_inode(flp)->i_size, loc);
189 do_gettimeofday(&tv); 189 do_gettimeofday(&tv);
190 190
191 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "download start %lx", ((tv.tv_sec * 1000) + (tv.tv_usec / 1000))); 191 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "download start %lx", ((tv.tv_sec * 1000) + (tv.tv_usec / 1000)));
diff --git a/drivers/staging/ccg/f_mass_storage.c b/drivers/staging/ccg/f_mass_storage.c
index 4f1142efa6d1..20bc2b454ac2 100644
--- a/drivers/staging/ccg/f_mass_storage.c
+++ b/drivers/staging/ccg/f_mass_storage.c
@@ -998,7 +998,7 @@ static int do_synchronize_cache(struct fsg_common *common)
998static void invalidate_sub(struct fsg_lun *curlun) 998static void invalidate_sub(struct fsg_lun *curlun)
999{ 999{
1000 struct file *filp = curlun->filp; 1000 struct file *filp = curlun->filp;
1001 struct inode *inode = filp->f_path.dentry->d_inode; 1001 struct inode *inode = file_inode(filp);
1002 unsigned long rc; 1002 unsigned long rc;
1003 1003
1004 rc = invalidate_mapping_pages(inode->i_mapping, 0, -1); 1004 rc = invalidate_mapping_pages(inode->i_mapping, 0, -1);
diff --git a/drivers/staging/ccg/rndis.c b/drivers/staging/ccg/rndis.c
index e4192b887de9..d9297eebbf73 100644
--- a/drivers/staging/ccg/rndis.c
+++ b/drivers/staging/ccg/rndis.c
@@ -1065,7 +1065,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, 1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1066 size_t count, loff_t *ppos) 1066 size_t count, loff_t *ppos)
1067{ 1067{
1068 rndis_params *p = PDE(file->f_path.dentry->d_inode)->data; 1068 rndis_params *p = PDE(file_inode(file))->data;
1069 u32 speed = 0; 1069 u32 speed = 0;
1070 int i, fl_speed = 0; 1070 int i, fl_speed = 0;
1071 1071
diff --git a/drivers/staging/ccg/storage_common.c b/drivers/staging/ccg/storage_common.c
index 8d9bcd8207c8..abb01ac74cec 100644
--- a/drivers/staging/ccg/storage_common.c
+++ b/drivers/staging/ccg/storage_common.c
@@ -656,7 +656,7 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
656 if (!(filp->f_mode & FMODE_WRITE)) 656 if (!(filp->f_mode & FMODE_WRITE))
657 ro = 1; 657 ro = 1;
658 658
659 inode = filp->f_path.dentry->d_inode; 659 inode = file_inode(filp);
660 if ((!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) { 660 if ((!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) {
661 LINFO(curlun, "invalid file type: %s\n", filename); 661 LINFO(curlun, "invalid file type: %s\n", filename);
662 goto out; 662 goto out;
diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c
index c214078a89e9..b2bda32254ac 100644
--- a/drivers/staging/dgrp/dgrp_specproc.c
+++ b/drivers/staging/dgrp/dgrp_specproc.c
@@ -354,7 +354,7 @@ static int dgrp_gen_proc_open(struct inode *inode, struct file *file)
354 struct dgrp_proc_entry *entry; 354 struct dgrp_proc_entry *entry;
355 int ret = 0; 355 int ret = 0;
356 356
357 de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode); 357 de = (struct proc_dir_entry *) PDE(file_inode(file));
358 if (!de || !de->data) { 358 if (!de || !de->data) {
359 ret = -ENXIO; 359 ret = -ENXIO;
360 goto done; 360 goto done;
@@ -384,7 +384,7 @@ static int dgrp_gen_proc_close(struct inode *inode, struct file *file)
384 struct proc_dir_entry *de; 384 struct proc_dir_entry *de;
385 struct dgrp_proc_entry *entry; 385 struct dgrp_proc_entry *entry;
386 386
387 de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode); 387 de = (struct proc_dir_entry *) PDE(file_inode(file));
388 if (!de || !de->data) 388 if (!de || !de->data)
389 goto done; 389 goto done;
390 390
diff --git a/drivers/staging/omapdrm/omap_gem_helpers.c b/drivers/staging/omapdrm/omap_gem_helpers.c
index ffb8cceaeb46..7d1b64a7404b 100644
--- a/drivers/staging/omapdrm/omap_gem_helpers.c
+++ b/drivers/staging/omapdrm/omap_gem_helpers.c
@@ -40,7 +40,7 @@ struct page **_drm_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask)
40 int i, npages; 40 int i, npages;
41 41
42 /* This is the shared memory object that backs the GEM resource */ 42 /* This is the shared memory object that backs the GEM resource */
43 inode = obj->filp->f_path.dentry->d_inode; 43 inode = file_inode(obj->filp);
44 mapping = inode->i_mapping; 44 mapping = inode->i_mapping;
45 45
46 npages = obj->size >> PAGE_SHIFT; 46 npages = obj->size >> PAGE_SHIFT;
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 75189feac380..773014c7c752 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -411,7 +411,7 @@ struct socket *sockfd_to_socket(unsigned int sockfd)
411 return NULL; 411 return NULL;
412 } 412 }
413 413
414 inode = file->f_dentry->d_inode; 414 inode = file_inode(file);
415 415
416 if (!inode || !S_ISSOCK(inode->i_mode)) { 416 if (!inode || !S_ISSOCK(inode->i_mode)) {
417 fput(file); 417 fput(file);
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index 4ef852c4c4e1..869ce93ee204 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -318,7 +318,7 @@ static ssize_t buffer_from_user(unsigned int minor, const char __user *buf,
318static ssize_t vme_user_read(struct file *file, char __user *buf, size_t count, 318static ssize_t vme_user_read(struct file *file, char __user *buf, size_t count,
319 loff_t *ppos) 319 loff_t *ppos)
320{ 320{
321 unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev); 321 unsigned int minor = MINOR(file_inode(file)->i_rdev);
322 ssize_t retval; 322 ssize_t retval;
323 size_t image_size; 323 size_t image_size;
324 size_t okcount; 324 size_t okcount;
@@ -364,7 +364,7 @@ static ssize_t vme_user_read(struct file *file, char __user *buf, size_t count,
364static ssize_t vme_user_write(struct file *file, const char __user *buf, 364static ssize_t vme_user_write(struct file *file, const char __user *buf,
365 size_t count, loff_t *ppos) 365 size_t count, loff_t *ppos)
366{ 366{
367 unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev); 367 unsigned int minor = MINOR(file_inode(file)->i_rdev);
368 ssize_t retval; 368 ssize_t retval;
369 size_t image_size; 369 size_t image_size;
370 size_t okcount; 370 size_t okcount;
@@ -410,7 +410,7 @@ static ssize_t vme_user_write(struct file *file, const char __user *buf,
410static loff_t vme_user_llseek(struct file *file, loff_t off, int whence) 410static loff_t vme_user_llseek(struct file *file, loff_t off, int whence)
411{ 411{
412 loff_t absolute = -1; 412 loff_t absolute = -1;
413 unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev); 413 unsigned int minor = MINOR(file_inode(file)->i_rdev);
414 size_t image_size; 414 size_t image_size;
415 415
416 if (minor == CONTROL_MINOR) 416 if (minor == CONTROL_MINOR)
@@ -583,7 +583,7 @@ vme_user_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
583 int ret; 583 int ret;
584 584
585 mutex_lock(&vme_user_mutex); 585 mutex_lock(&vme_user_mutex);
586 ret = vme_user_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); 586 ret = vme_user_ioctl(file_inode(file), file, cmd, arg);
587 mutex_unlock(&vme_user_mutex); 587 mutex_unlock(&vme_user_mutex);
588 588
589 return ret; 589 return ret;
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index b9c88497e8f0..a65d507b0b0c 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -265,7 +265,7 @@ static int fd_do_rw(struct se_cmd *cmd, struct scatterlist *sgl,
265 * the expected virt_size for struct file w/o a backing struct 265 * the expected virt_size for struct file w/o a backing struct
266 * block_device. 266 * block_device.
267 */ 267 */
268 if (S_ISBLK(fd->f_dentry->d_inode->i_mode)) { 268 if (S_ISBLK(file_inode(fd)->i_mode)) {
269 if (ret < 0 || ret != cmd->data_length) { 269 if (ret < 0 || ret != cmd->data_length) {
270 pr_err("%s() returned %d, expecting %u for " 270 pr_err("%s() returned %d, expecting %u for "
271 "S_ISBLK\n", __func__, ret, 271 "S_ISBLK\n", __func__, ret,
diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c
index fa7268a93c06..e4ca345873c3 100644
--- a/drivers/tty/vt/vc_screen.c
+++ b/drivers/tty/vt/vc_screen.c
@@ -101,7 +101,7 @@ vcs_poll_data_get(struct file *file)
101 poll = kzalloc(sizeof(*poll), GFP_KERNEL); 101 poll = kzalloc(sizeof(*poll), GFP_KERNEL);
102 if (!poll) 102 if (!poll)
103 return NULL; 103 return NULL;
104 poll->cons_num = iminor(file->f_path.dentry->d_inode) & 127; 104 poll->cons_num = iminor(file_inode(file)) & 127;
105 init_waitqueue_head(&poll->waitq); 105 init_waitqueue_head(&poll->waitq);
106 poll->notifier.notifier_call = vcs_notifier; 106 poll->notifier.notifier_call = vcs_notifier;
107 if (register_vt_notifier(&poll->notifier) != 0) { 107 if (register_vt_notifier(&poll->notifier) != 0) {
@@ -182,7 +182,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
182 int size; 182 int size;
183 183
184 console_lock(); 184 console_lock();
185 size = vcs_size(file->f_path.dentry->d_inode); 185 size = vcs_size(file_inode(file));
186 console_unlock(); 186 console_unlock();
187 if (size < 0) 187 if (size < 0)
188 return size; 188 return size;
@@ -208,7 +208,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
208static ssize_t 208static ssize_t
209vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 209vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
210{ 210{
211 struct inode *inode = file->f_path.dentry->d_inode; 211 struct inode *inode = file_inode(file);
212 unsigned int currcons = iminor(inode); 212 unsigned int currcons = iminor(inode);
213 struct vc_data *vc; 213 struct vc_data *vc;
214 struct vcs_poll_data *poll; 214 struct vcs_poll_data *poll;
@@ -386,7 +386,7 @@ unlock_out:
386static ssize_t 386static ssize_t
387vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) 387vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
388{ 388{
389 struct inode *inode = file->f_path.dentry->d_inode; 389 struct inode *inode = file_inode(file);
390 unsigned int currcons = iminor(inode); 390 unsigned int currcons = iminor(inode);
391 struct vc_data *vc; 391 struct vc_data *vc;
392 long pos; 392 long pos;
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index cbacea933b18..2c42e06f9717 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -658,7 +658,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig)
658{ 658{
659 loff_t ret; 659 loff_t ret;
660 660
661 mutex_lock(&file->f_dentry->d_inode->i_mutex); 661 mutex_lock(&file_inode(file)->i_mutex);
662 662
663 switch (orig) { 663 switch (orig) {
664 case 0: 664 case 0:
@@ -674,7 +674,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig)
674 ret = -EINVAL; 674 ret = -EINVAL;
675 } 675 }
676 676
677 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 677 mutex_unlock(&file_inode(file)->i_mutex);
678 return ret; 678 return ret;
679} 679}
680 680
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index b78fbe222b72..6e8af6ddb5f7 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -160,7 +160,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
160{ 160{
161 loff_t ret; 161 loff_t ret;
162 162
163 mutex_lock(&file->f_dentry->d_inode->i_mutex); 163 mutex_lock(&file_inode(file)->i_mutex);
164 164
165 switch (orig) { 165 switch (orig) {
166 case 0: 166 case 0:
@@ -176,7 +176,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
176 ret = -EINVAL; 176 ret = -EINVAL;
177 } 177 }
178 178
179 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 179 mutex_unlock(&file_inode(file)->i_mutex);
180 return ret; 180 return ret;
181} 181}
182 182
@@ -1970,7 +1970,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
1970 void __user *p) 1970 void __user *p)
1971{ 1971{
1972 struct dev_state *ps = file->private_data; 1972 struct dev_state *ps = file->private_data;
1973 struct inode *inode = file->f_path.dentry->d_inode; 1973 struct inode *inode = file_inode(file);
1974 struct usb_device *dev = ps->dev; 1974 struct usb_device *dev = ps->dev;
1975 int ret = -ENOTTY; 1975 int ret = -ENOTTY;
1976 1976
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index a7aed84d98c9..fd49dba53613 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -93,7 +93,7 @@ static ssize_t queue_dbg_read(struct file *file, char __user *buf,
93 if (!access_ok(VERIFY_WRITE, buf, nbytes)) 93 if (!access_ok(VERIFY_WRITE, buf, nbytes))
94 return -EFAULT; 94 return -EFAULT;
95 95
96 mutex_lock(&file->f_dentry->d_inode->i_mutex); 96 mutex_lock(&file_inode(file)->i_mutex);
97 list_for_each_entry_safe(req, tmp_req, queue, queue) { 97 list_for_each_entry_safe(req, tmp_req, queue, queue) {
98 len = snprintf(tmpbuf, sizeof(tmpbuf), 98 len = snprintf(tmpbuf, sizeof(tmpbuf),
99 "%8p %08x %c%c%c %5d %c%c%c\n", 99 "%8p %08x %c%c%c %5d %c%c%c\n",
@@ -120,7 +120,7 @@ static ssize_t queue_dbg_read(struct file *file, char __user *buf,
120 nbytes -= len; 120 nbytes -= len;
121 buf += len; 121 buf += len;
122 } 122 }
123 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 123 mutex_unlock(&file_inode(file)->i_mutex);
124 124
125 return actual; 125 return actual;
126} 126}
@@ -168,13 +168,13 @@ out:
168static ssize_t regs_dbg_read(struct file *file, char __user *buf, 168static ssize_t regs_dbg_read(struct file *file, char __user *buf,
169 size_t nbytes, loff_t *ppos) 169 size_t nbytes, loff_t *ppos)
170{ 170{
171 struct inode *inode = file->f_dentry->d_inode; 171 struct inode *inode = file_inode(file);
172 int ret; 172 int ret;
173 173
174 mutex_lock(&inode->i_mutex); 174 mutex_lock(&inode->i_mutex);
175 ret = simple_read_from_buffer(buf, nbytes, ppos, 175 ret = simple_read_from_buffer(buf, nbytes, ppos,
176 file->private_data, 176 file->private_data,
177 file->f_dentry->d_inode->i_size); 177 file_inode(file)->i_size);
178 mutex_unlock(&inode->i_mutex); 178 mutex_unlock(&inode->i_mutex);
179 179
180 return ret; 180 return ret;
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 5d027b3e1ef0..50a46a429efb 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -992,7 +992,7 @@ static int do_synchronize_cache(struct fsg_common *common)
992static void invalidate_sub(struct fsg_lun *curlun) 992static void invalidate_sub(struct fsg_lun *curlun)
993{ 993{
994 struct file *filp = curlun->filp; 994 struct file *filp = curlun->filp;
995 struct inode *inode = filp->f_path.dentry->d_inode; 995 struct inode *inode = file_inode(filp);
996 unsigned long rc; 996 unsigned long rc;
997 997
998 rc = invalidate_mapping_pages(inode->i_mapping, 0, -1); 998 rc = invalidate_mapping_pages(inode->i_mapping, 0, -1);
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 35bcc83d1e04..bf7a56b6d48a 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -688,7 +688,7 @@ static int
688printer_fsync(struct file *fd, loff_t start, loff_t end, int datasync) 688printer_fsync(struct file *fd, loff_t start, loff_t end, int datasync)
689{ 689{
690 struct printer_dev *dev = fd->private_data; 690 struct printer_dev *dev = fd->private_data;
691 struct inode *inode = fd->f_path.dentry->d_inode; 691 struct inode *inode = file_inode(fd);
692 unsigned long flags; 692 unsigned long flags;
693 int tx_list_empty; 693 int tx_list_empty;
694 694
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index e4192b887de9..d9297eebbf73 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -1065,7 +1065,7 @@ static int rndis_proc_show(struct seq_file *m, void *v)
1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer, 1065static ssize_t rndis_proc_write(struct file *file, const char __user *buffer,
1066 size_t count, loff_t *ppos) 1066 size_t count, loff_t *ppos)
1067{ 1067{
1068 rndis_params *p = PDE(file->f_path.dentry->d_inode)->data; 1068 rndis_params *p = PDE(file_inode(file))->data;
1069 u32 speed = 0; 1069 u32 speed = 0;
1070 int i, fl_speed = 0; 1070 int i, fl_speed = 0;
1071 1071
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 0e3ae43454a2..b5d3f0eeeb7d 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -501,7 +501,7 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
501 if (!(filp->f_mode & FMODE_WRITE)) 501 if (!(filp->f_mode & FMODE_WRITE))
502 ro = 1; 502 ro = 1;
503 503
504 inode = filp->f_path.dentry->d_inode; 504 inode = file_inode(filp);
505 if ((!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) { 505 if ((!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) {
506 LINFO(curlun, "invalid file type: %s\n", filename); 506 LINFO(curlun, "invalid file type: %s\n", filename);
507 goto out; 507 goto out;
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 88cad6b8b479..900aa4ecd617 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -69,7 +69,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
69int fb_deferred_io_fsync(struct file *file, loff_t start, loff_t end, int datasync) 69int fb_deferred_io_fsync(struct file *file, loff_t start, loff_t end, int datasync)
70{ 70{
71 struct fb_info *info = file->private_data; 71 struct fb_info *info = file->private_data;
72 struct inode *inode = file->f_path.dentry->d_inode; 72 struct inode *inode = file_inode(file);
73 int err = filemap_write_and_wait_range(inode->i_mapping, start, end); 73 int err = filemap_write_and_wait_range(inode->i_mapping, start, end);
74 if (err) 74 if (err)
75 return err; 75 return err;
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 3ff0105a496a..bf01980c9554 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -727,7 +727,7 @@ static const struct file_operations fb_proc_fops = {
727 */ 727 */
728static struct fb_info *file_fb_info(struct file *file) 728static struct fb_info *file_fb_info(struct file *file)
729{ 729{
730 struct inode *inode = file->f_path.dentry->d_inode; 730 struct inode *inode = file_inode(file);
731 int fbidx = iminor(inode); 731 int fbidx = iminor(inode);
732 struct fb_info *info = registered_fb[fbidx]; 732 struct fb_info *info = registered_fb[fbidx];
733 733
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c
index f2566c19e71c..113c7876c855 100644
--- a/drivers/video/msm/mdp.c
+++ b/drivers/video/msm/mdp.c
@@ -261,7 +261,7 @@ int get_img(struct mdp_img *img, struct fb_info *info,
261 if (f.file == NULL) 261 if (f.file == NULL)
262 return -1; 262 return -1;
263 263
264 if (MAJOR(f.file->f_dentry->d_inode->i_rdev) == FB_MAJOR) { 264 if (MAJOR(file_inode(f.file)->i_rdev) == FB_MAJOR) {
265 *start = info->fix.smem_start; 265 *start = info->fix.smem_start;
266 *len = info->fix.smem_len; 266 *len = info->fix.smem_len;
267 } else 267 } else
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 11d55ce5ca81..70387582843f 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -411,7 +411,7 @@ static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
411 .identity = DRIVER_NAME, 411 .identity = DRIVER_NAME,
412 }; 412 };
413 void __user *argp = (void __user *)arg; 413 void __user *argp = (void __user *)arg;
414 struct inode *inode = file->f_path.dentry->d_inode; 414 struct inode *inode = file_inode(file);
415 int index = iminor(inode) - WD0_MINOR; 415 int index = iminor(inode) - WD0_MINOR;
416 struct cpwd *p = cpwd_device; 416 struct cpwd *p = cpwd_device;
417 int setopt = 0; 417 int setopt = 0;
@@ -499,7 +499,7 @@ static long cpwd_compat_ioctl(struct file *file, unsigned int cmd,
499static ssize_t cpwd_write(struct file *file, const char __user *buf, 499static ssize_t cpwd_write(struct file *file, const char __user *buf,
500 size_t count, loff_t *ppos) 500 size_t count, loff_t *ppos)
501{ 501{
502 struct inode *inode = file->f_path.dentry->d_inode; 502 struct inode *inode = file_inode(file);
503 struct cpwd *p = cpwd_device; 503 struct cpwd *p = cpwd_device;
504 int index = iminor(inode); 504 int index = iminor(inode);
505 505
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c
index 988880dcee75..73b33837e12c 100644
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -22,7 +22,7 @@ static loff_t
22proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) 22proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
23{ 23{
24 loff_t new = -1; 24 loff_t new = -1;
25 struct inode *inode = file->f_path.dentry->d_inode; 25 struct inode *inode = file_inode(file);
26 26
27 mutex_lock(&inode->i_mutex); 27 mutex_lock(&inode->i_mutex);
28 switch (whence) { 28 switch (whence) {
@@ -47,7 +47,7 @@ proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
47static ssize_t 47static ssize_t
48proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) 48proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
49{ 49{
50 struct inode *ino = file->f_path.dentry->d_inode; 50 struct inode *ino = file_inode(file);
51 struct proc_dir_entry *dp = PDE(ino); 51 struct proc_dir_entry *dp = PDE(ino);
52 struct zorro_dev *z = dp->data; 52 struct zorro_dev *z = dp->data;
53 struct ConfigDev cd; 53 struct ConfigDev cd;