···116116117117static int cplbinfo_open(struct inode *inode, struct file *file)118118{119119- struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);119119+ struct proc_dir_entry *pde = PDE(file_inode(file));120120 char cplb_type;121121 unsigned int cpu;122122 int ret;
+4-4
arch/cris/arch-v10/drivers/sync_serial.c
···654654655655static unsigned int sync_serial_poll(struct file *file, poll_table *wait)656656{657657- int dev = MINOR(file->f_dentry->d_inode->i_rdev);657657+ int dev = MINOR(file_inode(file)->i_rdev);658658 unsigned int mask = 0;659659 struct sync_port *port;660660 DEBUGPOLL(static unsigned int prev_mask = 0);···685685 int return_val = 0;686686 unsigned long flags;687687688688- int dev = MINOR(file->f_dentry->d_inode->i_rdev);688688+ int dev = MINOR(file_inode(file)->i_rdev);689689 struct sync_port *port;690690691691 if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) {···973973static ssize_t sync_serial_write(struct file *file, const char *buf,974974 size_t count, loff_t *ppos)975975{976976- int dev = MINOR(file->f_dentry->d_inode->i_rdev);976976+ int dev = MINOR(file_inode(file)->i_rdev);977977 DECLARE_WAITQUEUE(wait, current);978978 struct sync_port *port;979979 unsigned long flags;···10971097static ssize_t sync_serial_read(struct file *file, char *buf,10981098 size_t count, loff_t *ppos)10991099{11001100- int dev = MINOR(file->f_dentry->d_inode->i_rdev);11001100+ int dev = MINOR(file_inode(file)->i_rdev);11011101 int avail;11021102 struct sync_port *port;11031103 unsigned char *start;
+1-2
arch/cris/arch-v32/drivers/cryptocop.c
···31353135static long31363136cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)31373137{31383138- struct inode *inode = file->f_path.dentry->d_inode;31393138 long ret;3140313931413140 mutex_lock(&cryptocop_mutex);31423142- ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg);31413141+ ret = cryptocop_ioctl_unlocked(file_inode(filp), filp, cmd, arg);31433142 mutex_unlock(&cryptocop_mutex);3144314331453144 return ret;
+4-4
arch/cris/arch-v32/drivers/sync_serial.c
···609609610610static unsigned int sync_serial_poll(struct file *file, poll_table *wait)611611{612612- int dev = iminor(file->f_path.dentry->d_inode);612612+ int dev = iminor(file_inode(file));613613 unsigned int mask = 0;614614 sync_port *port;615615 DEBUGPOLL( static unsigned int prev_mask = 0; );···657657{658658 int return_val = 0;659659 int dma_w_size = regk_dma_set_w_size1;660660- int dev = iminor(file->f_path.dentry->d_inode);660660+ int dev = iminor(file_inode(file));661661 sync_port *port;662662 reg_sser_rw_tr_cfg tr_cfg;663663 reg_sser_rw_rec_cfg rec_cfg;···979979static ssize_t sync_serial_write(struct file *file, const char *buf,980980 size_t count, loff_t *ppos)981981{982982- int dev = iminor(file->f_path.dentry->d_inode);982982+ int dev = iminor(file_inode(file));983983 DECLARE_WAITQUEUE(wait, current);984984 struct sync_port *port;985985 int trunc_count;···11021102static ssize_t sync_serial_read(struct file * file, char * buf,11031103 size_t count, loff_t *ppos)11041104{11051105- int dev = iminor(file->f_path.dentry->d_inode);11051105+ int dev = iminor(file_inode(file));11061106 int avail;11071107 sync_port *port;11081108 unsigned char* start;
···4747 if (filp->f_op != &spufs_context_fops)4848 goto out;49495050- i = SPUFS_I(filp->f_path.dentry->d_inode);5050+ i = SPUFS_I(file_inode(filp));5151 ret = spufs_run_spu(i->i_ctx, &npc, &status);52525353 if (put_user(npc, unpc))
···140140static ssize_t alignment_proc_write(struct file *file,141141 const char __user *buffer, size_t count, loff_t *pos)142142{143143- int *data = PDE(file->f_path.dentry->d_inode)->data;143143+ int *data = PDE(file_inode(file))->data;144144 char mode;145145146146 if (count > 0) {
+2-4
arch/x86/ia32/ia32_aout.c
···271271 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&272272 N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) ||273273 N_TRSIZE(ex) || N_DRSIZE(ex) ||274274- i_size_read(bprm->file->f_path.dentry->d_inode) <274274+ i_size_read(file_inode(bprm->file)) <275275 ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {276276 return -ENOEXEC;277277 }···425425426426static int load_aout_library(struct file *file)427427{428428- struct inode *inode;429428 unsigned long bss, start_addr, len, error;430429 int retval;431430 struct exec ex;432431433433- inode = file->f_path.dentry->d_inode;434432435433 retval = -ENOEXEC;436434 error = kernel_read(file, 0, (char *) &ex, sizeof(ex));···438440 /* We come in here for the regular a.out style of shared libraries */439441 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != QMAGIC) || N_TRSIZE(ex) ||440442 N_DRSIZE(ex) || ((ex.a_entry & 0xfff) && N_MAGIC(ex) == ZMAGIC) ||441441- i_size_read(inode) <443443+ i_size_read(file_inode(file)) <442444 ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {443445 goto out;444446 }
+2-2
arch/x86/kernel/cpuid.c
···8585{8686 char __user *tmp = buf;8787 struct cpuid_regs cmd;8888- int cpu = iminor(file->f_path.dentry->d_inode);8888+ int cpu = iminor(file_inode(file));8989 u64 pos = *ppos;9090 ssize_t bytes = 0;9191 int err = 0;···116116 unsigned int cpu;117117 struct cpuinfo_x86 *c;118118119119- cpu = iminor(file->f_path.dentry->d_inode);119119+ cpu = iminor(file_inode(file));120120 if (cpu >= nr_cpu_ids || !cpu_online(cpu))121121 return -ENXIO; /* No such CPU */122122
···181181static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,182182 loff_t *ppos)183183{184184- struct inode *inode = file->f_path.dentry->d_inode;184184+ struct inode *inode = file_inode(file);185185 int dev = iminor(inode) & 0x0f;186186187187 switch(dev)···244244static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count,245245 loff_t *ppos)246246{247247- struct inode *inode = file->f_path.dentry->d_inode;247247+ struct inode *inode = file_inode(file);248248 int dev = iminor(inode) & 0x0f;249249250250 switch(dev)···306306static long dsp56k_ioctl(struct file *file, unsigned int cmd,307307 unsigned long arg)308308{309309- int dev = iminor(file->f_path.dentry->d_inode) & 0x0f;309309+ int dev = iminor(file_inode(file)) & 0x0f;310310 void __user *argp = (void __user *)arg;311311312312 switch(dev)···408408#if 0409409static unsigned int dsp56k_poll(struct file *file, poll_table *wait)410410{411411- int dev = iminor(file->f_path.dentry->d_inode) & 0x0f;411411+ int dev = iminor(file_inode(file)) & 0x0f;412412413413 switch(dev)414414 {
+2-2
drivers/char/dtlk.c
···125125static ssize_t dtlk_read(struct file *file, char __user *buf,126126 size_t count, loff_t * ppos)127127{128128- unsigned int minor = iminor(file->f_path.dentry->d_inode);128128+ unsigned int minor = iminor(file_inode(file));129129 char ch;130130 int i = 0, retries;131131···177177 }178178#endif179179180180- if (iminor(file->f_path.dentry->d_inode) != DTLK_MINOR)180180+ if (iminor(file_inode(file)) != DTLK_MINOR)181181 return -EINVAL;182182183183 while (1) {
+4-4
drivers/char/lp.c
···294294static ssize_t lp_write(struct file * file, const char __user * buf,295295 size_t count, loff_t *ppos)296296{297297- unsigned int minor = iminor(file->f_path.dentry->d_inode);297297+ unsigned int minor = iminor(file_inode(file));298298 struct parport *port = lp_table[minor].dev->port;299299 char *kbuf = lp_table[minor].lp_buffer;300300 ssize_t retv = 0;···413413 size_t count, loff_t *ppos)414414{415415 DEFINE_WAIT(wait);416416- unsigned int minor=iminor(file->f_path.dentry->d_inode);416416+ unsigned int minor=iminor(file_inode(file));417417 struct parport *port = lp_table[minor].dev->port;418418 ssize_t retval = 0;419419 char *kbuf = lp_table[minor].lp_buffer;···679679 struct timeval par_timeout;680680 int ret;681681682682- minor = iminor(file->f_path.dentry->d_inode);682682+ minor = iminor(file_inode(file));683683 mutex_lock(&lp_mutex);684684 switch (cmd) {685685 case LPSETTIMEOUT:···707707 struct timeval par_timeout;708708 int ret;709709710710- minor = iminor(file->f_path.dentry->d_inode);710710+ minor = iminor(file_inode(file));711711 mutex_lock(&lp_mutex);712712 switch (cmd) {713713 case LPSETTIMEOUT:
···164164 unsigned int minor;165165 char value;166166167167- minor = iminor(file->f_path.dentry->d_inode);167167+ minor = iminor(file_inode(file));168168 switch (minor) {169169 case 0:170170 value = get_led();···200200 int retval = 0;201201 char c;202202203203- minor = iminor(file->f_path.dentry->d_inode);203203+ minor = iminor(file_inode(file));204204 switch (minor) {205205 case 0:206206 type = TYPE_LED;
+1-1
drivers/gpu/drm/gma500/gtt.c
···202202 WARN_ON(gt->pages);203203204204 /* This is the shared memory object that backs the GEM resource */205205- inode = gt->gem.filp->f_path.dentry->d_inode;205205+ inode = file_inode(gt->gem.filp);206206 mapping = inode->i_mapping;207207208208 gt->pages = kmalloc(pages * sizeof(struct page *), GFP_KERNEL);
+5-5
drivers/gpu/drm/i915/i915_gem.c
···16351635 * To do this we must instruct the shmfs to drop all of its16361636 * backing pages, *now*.16371637 */16381638- inode = obj->base.filp->f_path.dentry->d_inode;16381638+ inode = file_inode(obj->base.filp);16391639 shmem_truncate_range(inode, 0, (loff_t)-1);1640164016411641 obj->madv = __I915_MADV_PURGED;···18001800 *18011801 * Fail silently without starting the shrinker18021802 */18031803- mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping;18031803+ mapping = file_inode(obj->base.filp)->i_mapping;18041804 gfp = mapping_gfp_mask(mapping);18051805 gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD;18061806 gfp &= ~(__GFP_IO | __GFP_WAIT);···37243724 mask |= __GFP_DMA32;37253725 }3726372637273727- mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping;37273727+ mapping = file_inode(obj->base.filp)->i_mapping;37283728 mapping_set_gfp_mask(mapping, mask);3729372937303730 i915_gem_object_init(obj, &i915_gem_object_ops);···42284228void i915_gem_detach_phys_object(struct drm_device *dev,42294229 struct drm_i915_gem_object *obj)42304230{42314231- struct address_space *mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping;42314231+ struct address_space *mapping = file_inode(obj->base.filp)->i_mapping;42324232 char *vaddr;42334233 int i;42344234 int page_count;···42644264 int id,42654265 int align)42664266{42674267- struct address_space *mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping;42674267+ struct address_space *mapping = file_inode(obj->base.filp)->i_mapping;42684268 drm_i915_private_t *dev_priv = dev->dev_private;42694269 int ret = 0;42704270 int page_count;
+2-2
drivers/gpu/drm/ttm/ttm_tt.c
···296296 swap_storage = ttm->swap_storage;297297 BUG_ON(swap_storage == NULL);298298299299- swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;299299+ swap_space = file_inode(swap_storage)->i_mapping;300300301301 for (i = 0; i < ttm->num_pages; ++i) {302302 from_page = shmem_read_mapping_page(swap_space, i);···345345 } else346346 swap_storage = persistent_swap_storage;347347348348- swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;348348+ swap_space = file_inode(swap_storage)->i_mapping;349349350350 for (i = 0; i < ttm->num_pages; ++i) {351351 from_page = ttm->pages[i];
···378378379379static long roccat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)380380{381381- struct inode *inode = file->f_path.dentry->d_inode;381381+ struct inode *inode = file_inode(file);382382 struct roccat_device *device;383383 unsigned int minor = iminor(inode);384384 long retval = 0;
+3-3
drivers/hid/hidraw.c
···108108 * This function is to be called with the minors_lock mutex held */109109static ssize_t hidraw_send_report(struct file *file, const char __user *buffer, size_t count, unsigned char report_type)110110{111111- unsigned int minor = iminor(file->f_path.dentry->d_inode);111111+ unsigned int minor = iminor(file_inode(file));112112 struct hid_device *dev;113113 __u8 *buf;114114 int ret = 0;···176176 * mutex held. */177177static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t count, unsigned char report_type)178178{179179- unsigned int minor = iminor(file->f_path.dentry->d_inode);179179+ unsigned int minor = iminor(file_inode(file));180180 struct hid_device *dev;181181 __u8 *buf;182182 int ret = 0, len;···340340static long hidraw_ioctl(struct file *file, unsigned int cmd,341341 unsigned long arg)342342{343343- struct inode *inode = file->f_path.dentry->d_inode;343343+ struct inode *inode = file_inode(file);344344 unsigned int minor = iminor(inode);345345 long ret = 0;346346 struct hidraw *dev;
···45454646static struct super_block *qib_super;47474848-#define private2dd(file) ((file)->f_dentry->d_inode->i_private)4848+#define private2dd(file) (file_inode(file)->i_private)49495050static int qibfs_mknod(struct inode *dir, struct dentry *dentry,5151 umode_t mode, const struct file_operations *fops,···171171};172172173173/*174174- * Could use file->f_dentry->d_inode->i_ino to figure out which file,174174+ * Could use file_inode(file)->i_ino to figure out which file,175175 * instead of separate routine for each, but for now, this works...176176 */177177
+1-3
drivers/iommu/tegra-smmu.c
···964964{965965 struct smmu_debugfs_info *info;966966 struct smmu_device *smmu;967967- struct dentry *dent;968967 int i;969968 enum {970969 _OFF = 0,···991992 if (i == ARRAY_SIZE(command))992993 return -EINVAL;993994994994- dent = file->f_dentry;995995- info = dent->d_inode->i_private;995995+ info = file_inode(file)->i_private;996996 smmu = info->smmu;997997998998 offs = SMMU_CACHE_CONFIG(info->cache);
···10581058static ssize_t10591059isdn_read(struct file *file, char __user *buf, size_t count, loff_t *off)10601060{10611061- uint minor = iminor(file->f_path.dentry->d_inode);10611061+ uint minor = iminor(file_inode(file));10621062 int len = 0;10631063 int drvidx;10641064 int chidx;···11651165static ssize_t11661166isdn_write(struct file *file, const char __user *buf, size_t count, loff_t *off)11671167{11681168- uint minor = iminor(file->f_path.dentry->d_inode);11681168+ uint minor = iminor(file_inode(file));11691169 int drvidx;11701170 int chidx;11711171 int retval;···12281228isdn_poll(struct file *file, poll_table *wait)12291229{12301230 unsigned int mask = 0;12311231- unsigned int minor = iminor(file->f_path.dentry->d_inode);12311231+ unsigned int minor = iminor(file_inode(file));12321232 int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);1233123312341234 mutex_lock(&isdn_mutex);···12691269static int12701270isdn_ioctl(struct file *file, uint cmd, ulong arg)12711271{12721272- uint minor = iminor(file->f_path.dentry->d_inode);12721272+ uint minor = iminor(file_inode(file));12731273 isdn_ctrl c;12741274 int drvidx;12751275 int ret;
+1-1
drivers/isdn/i4l/isdn_ppp.c
···668668669669 if (is->debug & 0x2)670670 printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n",671671- iminor(file->f_path.dentry->d_inode));671671+ iminor(file_inode(file)));672672673673 /* just registers wait_queue hook. This doesn't really wait. */674674 poll_wait(file, &is->wq, wait);
···939939 int ret = 0;940940941941 mutex_lock(&cosa_chardev_mutex);942942- if ((n=iminor(file->f_path.dentry->d_inode)>>CARD_MINOR_BITS)942942+ if ((n=iminor(file_inode(file))>>CARD_MINOR_BITS)943943 >= nr_cards) {944944 ret = -ENODEV;945945 goto out;946946 }947947 cosa = cosa_cards+n;948948949949- if ((n=iminor(file->f_path.dentry->d_inode)949949+ if ((n=iminor(file_inode(file))950950 & ((1<<CARD_MINOR_BITS)-1)) >= cosa->nchannels) {951951 ret = -ENODEV;952952 goto out;
···433433 struct idal_buffer *ib;434434 int minor, rc = 0;435435436436- if (imajor(filp->f_path.dentry->d_inode) != IBM_FS3270_MAJOR)436436+ if (imajor(file_inode(filp)) != IBM_FS3270_MAJOR)437437 return -ENODEV;438438- minor = iminor(filp->f_path.dentry->d_inode);438438+ minor = iminor(file_inode(filp));439439 /* Check for minor 0 multiplexer. */440440 if (minor == 0) {441441 struct tty_struct *tty = get_current_tty();
+4-4
drivers/s390/char/tape_char.c
···273273 int minor, rc;274274275275 DBF_EVENT(6, "TCHAR:open: %i:%i\n",276276- imajor(filp->f_path.dentry->d_inode),277277- iminor(filp->f_path.dentry->d_inode));276276+ imajor(file_inode(filp)),277277+ iminor(file_inode(filp)));278278279279- if (imajor(filp->f_path.dentry->d_inode) != tapechar_major)279279+ if (imajor(file_inode(filp)) != tapechar_major)280280 return -ENODEV;281281282282- minor = iminor(filp->f_path.dentry->d_inode);282282+ minor = iminor(file_inode(filp));283283 device = tape_find_device(minor / TAPE_MINORS_PER_DEV);284284 if (IS_ERR(device)) {285285 DBF_EVENT(3, "TCHAR:open: tape_find_device() failed\n");
+1-1
drivers/s390/char/vmur.c
···703703 * We treat the minor number as the devno of the ur device704704 * to find in the driver tree.705705 */706706- devno = MINOR(file->f_dentry->d_inode->i_rdev);706706+ devno = MINOR(file_inode(file)->i_rdev);707707708708 urd = urdev_get_from_devno(devno);709709 if (!urd) {
···107107 int error = 0;108108 u8 ireg = 0;109109110110- if (D7S_MINOR != iminor(file->f_path.dentry->d_inode))110110+ if (D7S_MINOR != iminor(file_inode(file)))111111 return -ENODEV;112112113113 mutex_lock(&d7s_mutex);
+1-1
drivers/scsi/3w-9xxx.c
···640640/* This function handles ioctl for the character device */641641static long twa_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)642642{643643- struct inode *inode = file->f_path.dentry->d_inode;643643+ struct inode *inode = file_inode(file);644644 long timeout;645645 unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0;646646 dma_addr_t dma_handle;
···354354 struct dgrp_proc_entry *entry;355355 int ret = 0;356356357357- de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode);357357+ de = (struct proc_dir_entry *) PDE(file_inode(file));358358 if (!de || !de->data) {359359 ret = -ENXIO;360360 goto done;···384384 struct proc_dir_entry *de;385385 struct dgrp_proc_entry *entry;386386387387- de = (struct proc_dir_entry *) PDE(file->f_dentry->d_inode);387387+ de = (struct proc_dir_entry *) PDE(file_inode(file));388388 if (!de || !de->data)389389 goto done;390390
+1-1
drivers/staging/omapdrm/omap_gem_helpers.c
···4040 int i, npages;41414242 /* This is the shared memory object that backs the GEM resource */4343- inode = obj->filp->f_path.dentry->d_inode;4343+ inode = file_inode(obj->filp);4444 mapping = inode->i_mapping;45454646 npages = obj->size >> PAGE_SHIFT;
···318318static ssize_t vme_user_read(struct file *file, char __user *buf, size_t count,319319 loff_t *ppos)320320{321321- unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);321321+ unsigned int minor = MINOR(file_inode(file)->i_rdev);322322 ssize_t retval;323323 size_t image_size;324324 size_t okcount;···364364static ssize_t vme_user_write(struct file *file, const char __user *buf,365365 size_t count, loff_t *ppos)366366{367367- unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);367367+ unsigned int minor = MINOR(file_inode(file)->i_rdev);368368 ssize_t retval;369369 size_t image_size;370370 size_t okcount;···410410static loff_t vme_user_llseek(struct file *file, loff_t off, int whence)411411{412412 loff_t absolute = -1;413413- unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);413413+ unsigned int minor = MINOR(file_inode(file)->i_rdev);414414 size_t image_size;415415416416 if (minor == CONTROL_MINOR)···583583 int ret;584584585585 mutex_lock(&vme_user_mutex);586586- ret = vme_user_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);586586+ ret = vme_user_ioctl(file_inode(file), file, cmd, arg);587587 mutex_unlock(&vme_user_mutex);588588589589 return ret;
+1-1
drivers/target/target_core_file.c
···265265 * the expected virt_size for struct file w/o a backing struct266266 * block_device.267267 */268268- if (S_ISBLK(fd->f_dentry->d_inode->i_mode)) {268268+ if (S_ISBLK(file_inode(fd)->i_mode)) {269269 if (ret < 0 || ret != cmd->data_length) {270270 pr_err("%s() returned %d, expecting %u for "271271 "S_ISBLK\n", __func__, ret,
···273273{274274 if (!pipe->f_op || !pipe->f_op->write)275275 return -EINVAL;276276- if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode))276276+ if (!S_ISFIFO(file_inode(pipe)->i_mode))277277 return -EINVAL;278278 /* We want a packet pipe */279279 pipe->f_flags |= O_DIRECT;
···318318319319/*320320 * private llseek:321321- * for a block special file file->f_path.dentry->d_inode->i_size is zero321321+ * for a block special file file_inode(file)->i_size is zero322322 * so we compute the size by hand (just as in block_read/write above)323323 */324324static loff_t block_llseek(struct file *file, loff_t offset, int whence)
···677677static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,678678 unsigned long nr_segs, loff_t pos)679679{680680- struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;680680+ struct inode *inode = file_inode(iocb->ki_filp);681681 ssize_t written;682682 int rc;683683···701701 */702702 if (whence != SEEK_SET && whence != SEEK_CUR) {703703 int rc;704704- struct inode *inode = file->f_path.dentry->d_inode;704704+ struct inode *inode = file_inode(file);705705706706 /*707707 * We need to be sure that all dirty pages are written and the···733733{734734 /* note that this is called by vfs setlease with lock_flocks held735735 to protect *lease from going away */736736- struct inode *inode = file->f_path.dentry->d_inode;736736+ struct inode *inode = file_inode(file);737737 struct cifsFileInfo *cfile = file->private_data;738738739739 if (!(S_ISREG(inode->i_mode)))
···30303131long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)3232{3333- struct inode *inode = filep->f_dentry->d_inode;3333+ struct inode *inode = file_inode(filep);3434 int rc = -ENOTTY; /* strange error - but the precedent */3535 unsigned int xid;3636 struct cifs_sb_info *cifs_sb;
+2-2
fs/cifs/readdir.c
···505505 whether we can use the cached search results from the previous search */506506static int is_dir_changed(struct file *file)507507{508508- struct inode *inode = file->f_path.dentry->d_inode;508508+ struct inode *inode = file_inode(file);509509 struct cifsInodeInfo *cifsInfo = CIFS_I(inode);510510511511 if (cifsInfo->time == 0)···778778 switch ((int) file->f_pos) {779779 case 0:780780 if (filldir(direntry, ".", 1, file->f_pos,781781- file->f_path.dentry->d_inode->i_ino, DT_DIR) < 0) {781781+ file_inode(file)->i_ino, DT_DIR) < 0) {782782 cERROR(1, "Filldir for current dir failed");783783 rc = -ENOMEM;784784 break;
+1-1
fs/coda/dir.c
···397397 * We can't use vfs_readdir because we have to keep the file398398 * position in sync between the coda_file and the host_file.399399 * and as such we need grab the inode mutex. */400400- struct inode *host_inode = host_file->f_path.dentry->d_inode;400400+ struct inode *host_inode = file_inode(host_file);401401402402 mutex_lock(&host_inode->i_mutex);403403 host_file->f_pos = coda_file->f_pos;
···15821582 case FIBMAP:15831583 case FIGETBSZ:15841584 case FIONREAD:15851585- if (S_ISREG(f.file->f_path.dentry->d_inode->i_mode))15851585+ if (S_ISREG(file_inode(f.file)->i_mode))15861586 break;15871587 /*FALL THROUGH*/15881588
+1-1
fs/configfs/dir.c
···16251625 if (offset >= 0)16261626 break;16271627 default:16281628- mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);16281628+ mutex_unlock(&file_inode(file)->i_mutex);16291629 return -EINVAL;16301630 }16311631 if (offset != file->f_pos) {
+2-2
fs/coredump.c
···411411{412412 struct pipe_inode_info *pipe;413413414414- pipe = file->f_path.dentry->d_inode->i_pipe;414414+ pipe = file_inode(file)->i_pipe;415415416416 pipe_lock(pipe);417417 pipe->readers++;···600600 if (IS_ERR(cprm.file))601601 goto fail_unlock;602602603603- inode = cprm.file->f_path.dentry->d_inode;603603+ inode = file_inode(cprm.file);604604 if (inode->i_nlink > 1)605605 goto close_fail;606606 if (d_unhashed(cprm.file->f_path.dentry))
···30303131static int setfl(int fd, struct file * filp, unsigned long arg)3232{3333- struct inode * inode = filp->f_path.dentry->d_inode;3333+ struct inode * inode = file_inode(filp);3434 int error = 0;35353636 /*
+1-1
fs/file_table.c
···447447448448 lg_global_lock(&files_lglock);449449 do_file_list_for_each_entry(sb, f) {450450- if (!S_ISREG(f->f_path.dentry->d_inode->i_mode))450450+ if (!S_ISREG(file_inode(f)->i_mode))451451 continue;452452 if (!file_count(f))453453 continue;
···2323{2424 struct fuse_conn *fc;2525 mutex_lock(&fuse_mutex);2626- fc = file->f_path.dentry->d_inode->i_private;2626+ fc = file_inode(file)->i_private;2727 if (fc)2828 fc = fuse_conn_get(fc);2929 mutex_unlock(&fuse_mutex);
···178178 continue;179179 if (!rpc_cmp_addr(nlm_addr(block->b_host), addr))180180 continue;181181- if (nfs_compare_fh(NFS_FH(fl_blocked->fl_file->f_path.dentry->d_inode) ,fh) != 0)181181+ if (nfs_compare_fh(NFS_FH(file_inode(fl_blocked->fl_file)) ,fh) != 0)182182 continue;183183 /* Alright, we found a lock. Set the return status184184 * and wake up the caller
···105105/* This is used for a general mmap of a ncp file */106106int ncp_mmap(struct file *file, struct vm_area_struct *vma)107107{108108- struct inode *inode = file->f_path.dentry->d_inode;108108+ struct inode *inode = file_inode(file);109109110110 DPRINTK("ncp_mmap: called\n");111111
···163163 struct net *net;164164165165 ret = -EINVAL;166166- net = get_proc_task_net(filp->f_path.dentry->d_inode);166166+ net = get_proc_task_net(file_inode(filp));167167 if (net != NULL) {168168 ret = proc_readdir_de(net->proc_net, filp, dirent, filldir);169169 put_net(net);
···22222323int vfs_readdir(struct file *file, filldir_t filler, void *buf)2424{2525- struct inode *inode = file->f_path.dentry->d_inode;2525+ struct inode *inode = file_inode(file);2626 int res = -ENOTDIR;2727 if (!file->f_op || !file->f_op->readdir)2828 goto out;
+1-1
fs/reiserfs/file.c
···268268 * new current position before returning. */269269 )270270{271271- struct inode *inode = file->f_path.dentry->d_inode; // Inode of the file that we are writing to.271271+ struct inode *inode = file_inode(file); // Inode of the file that we are writing to.272272 /* To simplify coding at this time, we store273273 locked pages in array for now */274274 struct reiserfs_transaction_handle th;
+1-1
fs/reiserfs/ioctl.c
···2121 */2222long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)2323{2424- struct inode *inode = filp->f_path.dentry->d_inode;2424+ struct inode *inode = file_inode(filp);2525 unsigned int flags;2626 int err = 0;2727
···193193 if (!is_file_hugepages(shp->shm_file))194194 shmem_lock(shp->shm_file, 0, shp->mlock_user);195195 else if (shp->mlock_user)196196- user_shm_unlock(shp->shm_file->f_path.dentry->d_inode->i_size,196196+ user_shm_unlock(file_inode(shp->shm_file)->i_size,197197 shp->mlock_user);198198 fput (shp->shm_file);199199 security_shm_free(shp);···529529 * shmid gets reported as "inode#" in /proc/pid/maps.530530 * proc-ps tools use this. Changing this will break them.531531 */532532- file->f_dentry->d_inode->i_ino = shp->shm_perm.id;532532+ file_inode(file)->i_ino = shp->shm_perm.id;533533534534 ns->shm_tot += numpages;535535 error = shp->shm_perm.id;···678678{679679 struct inode *inode;680680681681- inode = shp->shm_file->f_path.dentry->d_inode;681681+ inode = file_inode(shp->shm_file);682682683683 if (is_file_hugepages(shp->shm_file)) {684684 struct address_space *mapping = inode->i_mapping;···11731173 (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) {117411741175117511761176- size = vma->vm_file->f_path.dentry->d_inode->i_size;11761176+ size = file_inode(vma->vm_file)->i_size;11771177 do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start);11781178 /*11791179 * We discovered the size of the shm segment, so
+1-1
kernel/acct.c
···205205 if (IS_ERR(file))206206 return PTR_ERR(file);207207208208- if (!S_ISREG(file->f_path.dentry->d_inode->i_mode)) {208208+ if (!S_ISREG(file_inode(file)->i_mode)) {209209 filp_close(file, NULL);210210 return -EACCES;211211 }
+3-3
kernel/cgroup.c
···26372637 */26382638static inline struct cftype *__file_cft(struct file *file)26392639{26402640- if (file->f_dentry->d_inode->i_fop != &cgroup_file_operations)26402640+ if (file_inode(file)->i_fop != &cgroup_file_operations)26412641 return ERR_PTR(-EINVAL);26422642 return __d_cft(file->f_dentry);26432643}···3852385238533853 /* the process need read permission on control file */38543854 /* AV: shouldn't we check that it's been opened for read instead? */38553855- ret = inode_permission(cfile->f_path.dentry->d_inode, MAY_READ);38553855+ ret = inode_permission(file_inode(cfile), MAY_READ);38563856 if (ret < 0)38573857 goto fail;38583858···54415441 struct inode *inode;54425442 struct cgroup_subsys_state *css;5443544354445444- inode = f->f_dentry->d_inode;54445444+ inode = file_inode(f);54455445 /* check in cgroup filesystem dir */54465446 if (inode->i_op != &cgroup_dir_inode_operations)54475447 return ERR_PTR(-EBADF);
+1-1
kernel/events/core.c
···3682368236833683static int perf_fasync(int fd, struct file *filp, int on)36843684{36853685- struct inode *inode = filp->f_path.dentry->d_inode;36853685+ struct inode *inode = file_inode(filp);36863686 struct perf_event *event = filp->private_data;36873687 int retval;36883688
···7676static ssize_t write_irq_affinity(int type, struct file *file,7777 const char __user *buffer, size_t count, loff_t *pos)7878{7979- unsigned int irq = (int)(long)PDE(file->f_path.dentry->d_inode)->data;7979+ unsigned int irq = (int)(long)PDE(file_inode(file))->data;8080 cpumask_var_t new_value;8181 int err;8282
+1-1
kernel/nsproxy.c
···251251 return PTR_ERR(file);252252253253 err = -EINVAL;254254- ei = PROC_I(file->f_dentry->d_inode);254254+ ei = PROC_I(file_inode(file));255255 ops = ei->ns_ops;256256 if (nstype && (ops->type != nstype))257257 goto out;
+2-2
kernel/relay.c
···11391139 if (!desc->count)11401140 return 0;1141114111421142- mutex_lock(&filp->f_path.dentry->d_inode->i_mutex);11421142+ mutex_lock(&file_inode(filp)->i_mutex);11431143 do {11441144 if (!relay_file_read_avail(buf, *ppos))11451145 break;···11591159 *ppos = relay_file_read_end_pos(buf, read_start, ret);11601160 }11611161 } while (desc->count && ret);11621162- mutex_unlock(&filp->f_path.dentry->d_inode->i_mutex);11621162+ mutex_unlock(&file_inode(filp)->i_mutex);1163116311641164 return desc->written;11651165}
+4-4
kernel/sys.c
···17921792static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)17931793{17941794 struct fd exe;17951795- struct dentry *dentry;17951795+ struct inode *inode;17961796 int err;1797179717981798 exe = fdget(fd);17991799 if (!exe.file)18001800 return -EBADF;1801180118021802- dentry = exe.file->f_path.dentry;18021802+ inode = file_inode(exe.file);1803180318041804 /*18051805 * Because the original mm->exe_file points to executable file, make···18071807 * overall picture.18081808 */18091809 err = -EACCES;18101810- if (!S_ISREG(dentry->d_inode->i_mode) ||18101810+ if (!S_ISREG(inode->i_mode) ||18111811 exe.file->f_path.mnt->mnt_flags & MNT_NOEXEC)18121812 goto exit;1813181318141814- err = inode_permission(dentry->d_inode, MAY_EXEC);18141814+ err = inode_permission(inode, MAY_EXEC);18151815 if (err)18161816 goto exit;18171817
+1-1
mm/fadvise.c
···3838 if (!f.file)3939 return -EBADF;40404141- if (S_ISFIFO(f.file->f_path.dentry->d_inode->i_mode)) {4141+ if (S_ISFIFO(file_inode(f.file)->i_mode)) {4242 ret = -ESPIPE;4343 goto out;4444 }
···385385 page = get_zeroed_page(GFP_KERNEL);386386 if (!page)387387 return -ENOMEM;388388- dev = PDE(file->f_path.dentry->d_inode)->data;388388+ dev = PDE(file_inode(file))->data;389389 if (!dev->ops->proc_read)390390 length = -EINVAL;391391 else {
+1-1
net/core/net_namespace.c
···344344 if (IS_ERR(file))345345 return ERR_CAST(file);346346347347- ei = PROC_I(file->f_dentry->d_inode);347347+ ei = PROC_I(file_inode(file));348348 if (ei->ns_ops == &netns_operations)349349 net = get_net(ei->ns);350350 else
···642642643643static long dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)644644{645645- int minor = iminor(file->f_path.dentry->d_inode);645645+ int minor = iminor(file_inode(file));646646 int ret;647647648648 if (cmd == OSS_GETVERSION) {···1012101210131013static ssize_t dev_read(struct file *file, char __user *buf, size_t count, loff_t *off)10141014{10151015- int minor = iminor(file->f_path.dentry->d_inode);10151015+ int minor = iminor(file_inode(file));10161016 if (minor == dev.dsp_minor)10171017 return dsp_read(buf, count);10181018 else···1021102110221022static ssize_t dev_write(struct file *file, const char __user *buf, size_t count, loff_t *off)10231023{10241024- int minor = iminor(file->f_path.dentry->d_inode);10241024+ int minor = iminor(file_inode(file));10251025 if (minor == dev.dsp_minor)10261026 return dsp_write(buf, count);10271027 else
+5-5
sound/oss/soundcard.c
···143143144144static ssize_t sound_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)145145{146146- int dev = iminor(file->f_path.dentry->d_inode);146146+ int dev = iminor(file_inode(file));147147 int ret = -EINVAL;148148149149 /*···176176177177static ssize_t sound_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)178178{179179- int dev = iminor(file->f_path.dentry->d_inode);179179+ int dev = iminor(file_inode(file));180180 int ret = -EINVAL;181181182182 mutex_lock(&soundcard_mutex);···333333static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg)334334{335335 int len = 0, dtype;336336- int dev = iminor(file->f_dentry->d_inode);336336+ int dev = iminor(file_inode(file));337337 long ret = -EINVAL;338338 void __user *p = (void __user *)arg;339339···406406407407static unsigned int sound_poll(struct file *file, poll_table * wait)408408{409409- struct inode *inode = file->f_path.dentry->d_inode;409409+ struct inode *inode = file_inode(file);410410 int dev = iminor(inode);411411412412 DEB(printk("sound_poll(dev=%d)\n", dev));···431431 int dev_class;432432 unsigned long size;433433 struct dma_buffparms *dmap = NULL;434434- int dev = iminor(file->f_path.dentry->d_inode);434434+ int dev = iminor(file_inode(file));435435436436 dev_class = dev & 0x0f;437437 dev >>= 4;
+1-1
sound/sound_firmware.c
···1919 printk(KERN_INFO "Unable to load '%s'.\n", fn);2020 return 0;2121 }2222- l = i_size_read(filp->f_path.dentry->d_inode);2222+ l = i_size_read(file_inode(filp));2323 if (l <= 0 || l > 131072)2424 {2525 printk(KERN_INFO "Invalid firmware '%s'\n", fn);