aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_aout.c8
-rw-r--r--fs/binfmt_elf.c2
-rw-r--r--fs/binfmt_elf_fdpic.c4
-rw-r--r--fs/binfmt_flat.c2
-rw-r--r--fs/binfmt_misc.c10
-rw-r--r--fs/block_dev.c4
-rw-r--r--fs/compat.c12
-rw-r--r--fs/compat_ioctl.c2
-rw-r--r--fs/dnotify.c4
-rw-r--r--fs/dquot.c4
-rw-r--r--fs/eventpoll.c4
-rw-r--r--fs/exec.c10
-rw-r--r--fs/fcntl.c2
-rw-r--r--fs/file_table.c10
-rw-r--r--fs/inode.c2
-rw-r--r--fs/inotify_user.c6
-rw-r--r--fs/ioctl.c14
-rw-r--r--fs/libfs.c14
-rw-r--r--fs/locks.c32
-rw-r--r--fs/namei.c10
-rw-r--r--fs/open.c26
-rw-r--r--fs/pipe.c28
-rw-r--r--fs/read_write.c20
-rw-r--r--fs/readdir.c2
-rw-r--r--fs/seq_file.c2
-rw-r--r--fs/splice.c18
-rw-r--r--fs/stat.c2
-rw-r--r--fs/super.c2
-rw-r--r--fs/sync.c4
-rw-r--r--fs/xattr.c8
30 files changed, 134 insertions, 134 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index 517e111bb7ef..813a887cd2b3 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -274,7 +274,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
274 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && 274 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
275 N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || 275 N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) ||
276 N_TRSIZE(ex) || N_DRSIZE(ex) || 276 N_TRSIZE(ex) || N_DRSIZE(ex) ||
277 i_size_read(bprm->file->f_dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { 277 i_size_read(bprm->file->f_path.dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
278 return -ENOEXEC; 278 return -ENOEXEC;
279 } 279 }
280 280
@@ -389,7 +389,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
389 { 389 {
390 printk(KERN_WARNING 390 printk(KERN_WARNING
391 "fd_offset is not page aligned. Please convert program: %s\n", 391 "fd_offset is not page aligned. Please convert program: %s\n",
392 bprm->file->f_dentry->d_name.name); 392 bprm->file->f_path.dentry->d_name.name);
393 error_time = jiffies; 393 error_time = jiffies;
394 } 394 }
395 395
@@ -469,7 +469,7 @@ static int load_aout_library(struct file *file)
469 int retval; 469 int retval;
470 struct exec ex; 470 struct exec ex;
471 471
472 inode = file->f_dentry->d_inode; 472 inode = file->f_path.dentry->d_inode;
473 473
474 retval = -ENOEXEC; 474 retval = -ENOEXEC;
475 error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); 475 error = kernel_read(file, 0, (char *) &ex, sizeof(ex));
@@ -506,7 +506,7 @@ static int load_aout_library(struct file *file)
506 { 506 {
507 printk(KERN_WARNING 507 printk(KERN_WARNING
508 "N_TXTOFF is not page aligned. Please convert library: %s\n", 508 "N_TXTOFF is not page aligned. Please convert library: %s\n",
509 file->f_dentry->d_name.name); 509 file->f_path.dentry->d_name.name);
510 error_time = jiffies; 510 error_time = jiffies;
511 } 511 }
512 down_write(&current->mm->mmap_sem); 512 down_write(&current->mm->mmap_sem);
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index be5869d34999..c6dbb4a7ec78 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1190,7 +1190,7 @@ static int maydump(struct vm_area_struct *vma)
1190 1190
1191 /* Dump shared memory only if mapped from an anonymous file. */ 1191 /* Dump shared memory only if mapped from an anonymous file. */
1192 if (vma->vm_flags & VM_SHARED) 1192 if (vma->vm_flags & VM_SHARED)
1193 return vma->vm_file->f_dentry->d_inode->i_nlink == 0; 1193 return vma->vm_file->f_path.dentry->d_inode->i_nlink == 0;
1194 1194
1195 /* If it hasn't been written to, don't write it out */ 1195 /* If it hasn't been written to, don't write it out */
1196 if (!vma->anon_vma) 1196 if (!vma->anon_vma)
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index ed9a61c6beb3..9f0b7efc3df5 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -855,7 +855,7 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
855 855
856dynamic_error: 856dynamic_error:
857 printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n", 857 printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n",
858 what, file->f_dentry->d_inode->i_ino); 858 what, file->f_path.dentry->d_inode->i_ino);
859 return -ELIBBAD; 859 return -ELIBBAD;
860} 860}
861 861
@@ -1186,7 +1186,7 @@ static int maydump(struct vm_area_struct *vma)
1186 1186
1187 /* Dump shared memory only if mapped from an anonymous file. */ 1187 /* Dump shared memory only if mapped from an anonymous file. */
1188 if (vma->vm_flags & VM_SHARED) { 1188 if (vma->vm_flags & VM_SHARED) {
1189 if (vma->vm_file->f_dentry->d_inode->i_nlink == 0) { 1189 if (vma->vm_file->f_path.dentry->d_inode->i_nlink == 0) {
1190 kdcore("%08lx: %08lx: no (share)", vma->vm_start, vma->vm_flags); 1190 kdcore("%08lx: %08lx: no (share)", vma->vm_start, vma->vm_flags);
1191 return 1; 1191 return 1;
1192 } 1192 }
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index a62fd4018a20..ae8595d49856 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -429,7 +429,7 @@ static int load_flat_file(struct linux_binprm * bprm,
429 int ret; 429 int ret;
430 430
431 hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */ 431 hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */
432 inode = bprm->file->f_dentry->d_inode; 432 inode = bprm->file->f_path.dentry->d_inode;
433 433
434 text_len = ntohl(hdr->data_start); 434 text_len = ntohl(hdr->data_start);
435 data_len = ntohl(hdr->data_end) - ntohl(hdr->data_start); 435 data_len = ntohl(hdr->data_end) - ntohl(hdr->data_start);
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 1713c48fef54..00687ea62738 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -542,7 +542,7 @@ static void kill_node(Node *e)
542static ssize_t 542static ssize_t
543bm_entry_read(struct file * file, char __user * buf, size_t nbytes, loff_t *ppos) 543bm_entry_read(struct file * file, char __user * buf, size_t nbytes, loff_t *ppos)
544{ 544{
545 Node *e = file->f_dentry->d_inode->i_private; 545 Node *e = file->f_path.dentry->d_inode->i_private;
546 loff_t pos = *ppos; 546 loff_t pos = *ppos;
547 ssize_t res; 547 ssize_t res;
548 char *page; 548 char *page;
@@ -576,7 +576,7 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
576 size_t count, loff_t *ppos) 576 size_t count, loff_t *ppos)
577{ 577{
578 struct dentry *root; 578 struct dentry *root;
579 Node *e = file->f_dentry->d_inode->i_private; 579 Node *e = file->f_path.dentry->d_inode->i_private;
580 int res = parse_command(buffer, count); 580 int res = parse_command(buffer, count);
581 581
582 switch (res) { 582 switch (res) {
@@ -584,7 +584,7 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
584 break; 584 break;
585 case 2: set_bit(Enabled, &e->flags); 585 case 2: set_bit(Enabled, &e->flags);
586 break; 586 break;
587 case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root); 587 case 3: root = dget(file->f_path.mnt->mnt_sb->s_root);
588 mutex_lock(&root->d_inode->i_mutex); 588 mutex_lock(&root->d_inode->i_mutex);
589 589
590 kill_node(e); 590 kill_node(e);
@@ -610,7 +610,7 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer,
610 Node *e; 610 Node *e;
611 struct inode *inode; 611 struct inode *inode;
612 struct dentry *root, *dentry; 612 struct dentry *root, *dentry;
613 struct super_block *sb = file->f_vfsmnt->mnt_sb; 613 struct super_block *sb = file->f_path.mnt->mnt_sb;
614 int err = 0; 614 int err = 0;
615 615
616 e = create_entry(buffer, count); 616 e = create_entry(buffer, count);
@@ -699,7 +699,7 @@ static ssize_t bm_status_write(struct file * file, const char __user * buffer,
699 switch (res) { 699 switch (res) {
700 case 1: enabled = 0; break; 700 case 1: enabled = 0; break;
701 case 2: enabled = 1; break; 701 case 2: enabled = 1; break;
702 case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root); 702 case 3: root = dget(file->f_path.mnt->mnt_sb->s_root);
703 mutex_lock(&root->d_inode->i_mutex); 703 mutex_lock(&root->d_inode->i_mutex);
704 704
705 while (!list_empty(&entries)) 705 while (!list_empty(&entries))
diff --git a/fs/block_dev.c b/fs/block_dev.c
index f3c3a44dd8b6..197f93921847 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -190,7 +190,7 @@ static int blkdev_commit_write(struct file *file, struct page *page, unsigned fr
190 190
191/* 191/*
192 * private llseek: 192 * private llseek:
193 * for a block special file file->f_dentry->d_inode->i_size is zero 193 * for a block special file file->f_path.dentry->d_inode->i_size is zero
194 * so we compute the size by hand (just as in block_read/write above) 194 * so we compute the size by hand (just as in block_read/write above)
195 */ 195 */
196static loff_t block_llseek(struct file *file, loff_t offset, int origin) 196static loff_t block_llseek(struct file *file, loff_t offset, int origin)
@@ -1013,7 +1013,7 @@ static int __blkdev_get(struct block_device *bdev, mode_t mode, unsigned flags,
1013 struct dentry fake_dentry = {}; 1013 struct dentry fake_dentry = {};
1014 fake_file.f_mode = mode; 1014 fake_file.f_mode = mode;
1015 fake_file.f_flags = flags; 1015 fake_file.f_flags = flags;
1016 fake_file.f_dentry = &fake_dentry; 1016 fake_file.f_path.dentry = &fake_dentry;
1017 fake_dentry.d_inode = bdev->bd_inode; 1017 fake_dentry.d_inode = bdev->bd_inode;
1018 1018
1019 return do_open(bdev, &fake_file, for_part); 1019 return do_open(bdev, &fake_file, for_part);
diff --git a/fs/compat.c b/fs/compat.c
index a7e3f162fb15..b766964a625c 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -232,7 +232,7 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user
232 file = fget(fd); 232 file = fget(fd);
233 if (!file) 233 if (!file)
234 goto out; 234 goto out;
235 error = vfs_statfs(file->f_dentry, &tmp); 235 error = vfs_statfs(file->f_path.dentry, &tmp);
236 if (!error) 236 if (!error)
237 error = put_compat_statfs(buf, &tmp); 237 error = put_compat_statfs(buf, &tmp);
238 fput(file); 238 fput(file);
@@ -303,7 +303,7 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c
303 file = fget(fd); 303 file = fget(fd);
304 if (!file) 304 if (!file)
305 goto out; 305 goto out;
306 error = vfs_statfs(file->f_dentry, &tmp); 306 error = vfs_statfs(file->f_path.dentry, &tmp);
307 if (!error) 307 if (!error)
308 error = put_compat_statfs64(buf, &tmp); 308 error = put_compat_statfs64(buf, &tmp);
309 fput(file); 309 fput(file);
@@ -365,7 +365,7 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd,
365 /* find the name of the device. */ 365 /* find the name of the device. */
366 path = (char *)__get_free_page(GFP_KERNEL); 366 path = (char *)__get_free_page(GFP_KERNEL);
367 if (path) { 367 if (path) {
368 fn = d_path(filp->f_dentry, filp->f_vfsmnt, path, PAGE_SIZE); 368 fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE);
369 if (IS_ERR(fn)) 369 if (IS_ERR(fn))
370 fn = "?"; 370 fn = "?";
371 } 371 }
@@ -416,7 +416,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
416 case FIBMAP: 416 case FIBMAP:
417 case FIGETBSZ: 417 case FIGETBSZ:
418 case FIONREAD: 418 case FIONREAD:
419 if (S_ISREG(filp->f_dentry->d_inode->i_mode)) 419 if (S_ISREG(filp->f_path.dentry->d_inode->i_mode))
420 break; 420 break;
421 /*FALL THROUGH*/ 421 /*FALL THROUGH*/
422 422
@@ -438,7 +438,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
438 goto found_handler; 438 goto found_handler;
439 } 439 }
440 440
441 if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) && 441 if (S_ISSOCK(filp->f_path.dentry->d_inode->i_mode) &&
442 cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { 442 cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
443 error = siocdevprivate_ioctl(fd, cmd, arg); 443 error = siocdevprivate_ioctl(fd, cmd, arg);
444 } else { 444 } else {
@@ -1259,7 +1259,7 @@ out:
1259 if (iov != iovstack) 1259 if (iov != iovstack)
1260 kfree(iov); 1260 kfree(iov);
1261 if ((ret + (type == READ)) > 0) { 1261 if ((ret + (type == READ)) > 0) {
1262 struct dentry *dentry = file->f_dentry; 1262 struct dentry *dentry = file->f_path.dentry;
1263 if (type == READ) 1263 if (type == READ)
1264 fsnotify_access(dentry); 1264 fsnotify_access(dentry);
1265 else 1265 else
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index bcc3caf5d820..c81c958b3e1d 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1177,7 +1177,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar
1177static int vt_check(struct file *file) 1177static int vt_check(struct file *file)
1178{ 1178{
1179 struct tty_struct *tty; 1179 struct tty_struct *tty;
1180 struct inode *inode = file->f_dentry->d_inode; 1180 struct inode *inode = file->f_path.dentry->d_inode;
1181 1181
1182 if (file->f_op->ioctl != tty_ioctl) 1182 if (file->f_op->ioctl != tty_ioctl)
1183 return -EINVAL; 1183 return -EINVAL;
diff --git a/fs/dnotify.c b/fs/dnotify.c
index 1f26a2b9eee1..936409fcd939 100644
--- a/fs/dnotify.c
+++ b/fs/dnotify.c
@@ -42,7 +42,7 @@ void dnotify_flush(struct file *filp, fl_owner_t id)
42 struct dnotify_struct **prev; 42 struct dnotify_struct **prev;
43 struct inode *inode; 43 struct inode *inode;
44 44
45 inode = filp->f_dentry->d_inode; 45 inode = filp->f_path.dentry->d_inode;
46 if (!S_ISDIR(inode->i_mode)) 46 if (!S_ISDIR(inode->i_mode))
47 return; 47 return;
48 spin_lock(&inode->i_lock); 48 spin_lock(&inode->i_lock);
@@ -74,7 +74,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
74 } 74 }
75 if (!dir_notify_enable) 75 if (!dir_notify_enable)
76 return -EINVAL; 76 return -EINVAL;
77 inode = filp->f_dentry->d_inode; 77 inode = filp->f_path.dentry->d_inode;
78 if (!S_ISDIR(inode->i_mode)) 78 if (!S_ISDIR(inode->i_mode))
79 return -ENOTDIR; 79 return -ENOTDIR;
80 dn = kmem_cache_alloc(dn_cache, GFP_KERNEL); 80 dn = kmem_cache_alloc(dn_cache, GFP_KERNEL);
diff --git a/fs/dquot.c b/fs/dquot.c
index 89066b19124d..0952cc474d9a 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -694,9 +694,9 @@ restart:
694 file_list_lock(); 694 file_list_lock();
695 list_for_each(p, &sb->s_files) { 695 list_for_each(p, &sb->s_files) {
696 struct file *filp = list_entry(p, struct file, f_u.fu_list); 696 struct file *filp = list_entry(p, struct file, f_u.fu_list);
697 struct inode *inode = filp->f_dentry->d_inode; 697 struct inode *inode = filp->f_path.dentry->d_inode;
698 if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) { 698 if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) {
699 struct dentry *dentry = dget(filp->f_dentry); 699 struct dentry *dentry = dget(filp->f_path.dentry);
700 file_list_unlock(); 700 file_list_unlock();
701 sb->dq_op->initialize(inode, type); 701 sb->dq_op->initialize(inode, type);
702 dput(dentry); 702 dput(dentry);
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 88a6f8d0b88e..3ae644e7e860 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -795,8 +795,8 @@ static int ep_getfd(int *efd, struct inode **einode, struct file **efile,
795 goto eexit_4; 795 goto eexit_4;
796 dentry->d_op = &eventpollfs_dentry_operations; 796 dentry->d_op = &eventpollfs_dentry_operations;
797 d_add(dentry, inode); 797 d_add(dentry, inode);
798 file->f_vfsmnt = mntget(eventpoll_mnt); 798 file->f_path.mnt = mntget(eventpoll_mnt);
799 file->f_dentry = dentry; 799 file->f_path.dentry = dentry;
800 file->f_mapping = inode->i_mapping; 800 file->f_mapping = inode->i_mapping;
801 801
802 file->f_pos = 0; 802 file->f_pos = 0;
diff --git a/fs/exec.c b/fs/exec.c
index add0e03c3ea9..60433e2254a4 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -912,7 +912,7 @@ EXPORT_SYMBOL(flush_old_exec);
912int prepare_binprm(struct linux_binprm *bprm) 912int prepare_binprm(struct linux_binprm *bprm)
913{ 913{
914 int mode; 914 int mode;
915 struct inode * inode = bprm->file->f_dentry->d_inode; 915 struct inode * inode = bprm->file->f_path.dentry->d_inode;
916 int retval; 916 int retval;
917 917
918 mode = inode->i_mode; 918 mode = inode->i_mode;
@@ -922,7 +922,7 @@ int prepare_binprm(struct linux_binprm *bprm)
922 bprm->e_uid = current->euid; 922 bprm->e_uid = current->euid;
923 bprm->e_gid = current->egid; 923 bprm->e_gid = current->egid;
924 924
925 if(!(bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)) { 925 if(!(bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID)) {
926 /* Set-uid? */ 926 /* Set-uid? */
927 if (mode & S_ISUID) { 927 if (mode & S_ISUID) {
928 current->personality &= ~PER_CLEAR_ON_SETID; 928 current->personality &= ~PER_CLEAR_ON_SETID;
@@ -1519,10 +1519,10 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
1519 0600); 1519 0600);
1520 if (IS_ERR(file)) 1520 if (IS_ERR(file))
1521 goto fail_unlock; 1521 goto fail_unlock;
1522 inode = file->f_dentry->d_inode; 1522 inode = file->f_path.dentry->d_inode;
1523 if (inode->i_nlink > 1) 1523 if (inode->i_nlink > 1)
1524 goto close_fail; /* multiple links - don't dump */ 1524 goto close_fail; /* multiple links - don't dump */
1525 if (!ispipe && d_unhashed(file->f_dentry)) 1525 if (!ispipe && d_unhashed(file->f_path.dentry))
1526 goto close_fail; 1526 goto close_fail;
1527 1527
1528 /* AK: actually i see no reason to not allow this for named pipes etc., 1528 /* AK: actually i see no reason to not allow this for named pipes etc.,
@@ -1533,7 +1533,7 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
1533 goto close_fail; 1533 goto close_fail;
1534 if (!file->f_op->write) 1534 if (!file->f_op->write)
1535 goto close_fail; 1535 goto close_fail;
1536 if (!ispipe && do_truncate(file->f_dentry, 0, 0, file) != 0) 1536 if (!ispipe && do_truncate(file->f_path.dentry, 0, 0, file) != 0)
1537 goto close_fail; 1537 goto close_fail;
1538 1538
1539 retval = binfmt->core_dump(signr, regs, file); 1539 retval = binfmt->core_dump(signr, regs, file);
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 4740d35e52cd..2bdaef35da54 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -204,7 +204,7 @@ asmlinkage long sys_dup(unsigned int fildes)
204 204
205static int setfl(int fd, struct file * filp, unsigned long arg) 205static int setfl(int fd, struct file * filp, unsigned long arg)
206{ 206{
207 struct inode * inode = filp->f_dentry->d_inode; 207 struct inode * inode = filp->f_path.dentry->d_inode;
208 int error = 0; 208 int error = 0;
209 209
210 /* 210 /*
diff --git a/fs/file_table.c b/fs/file_table.c
index 24f25a057d9c..4c17a18d8c10 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -152,8 +152,8 @@ EXPORT_SYMBOL(fput);
152 */ 152 */
153void fastcall __fput(struct file *file) 153void fastcall __fput(struct file *file)
154{ 154{
155 struct dentry *dentry = file->f_dentry; 155 struct dentry *dentry = file->f_path.dentry;
156 struct vfsmount *mnt = file->f_vfsmnt; 156 struct vfsmount *mnt = file->f_path.mnt;
157 struct inode *inode = dentry->d_inode; 157 struct inode *inode = dentry->d_inode;
158 158
159 might_sleep(); 159 might_sleep();
@@ -176,8 +176,8 @@ void fastcall __fput(struct file *file)
176 put_write_access(inode); 176 put_write_access(inode);
177 put_pid(file->f_owner.pid); 177 put_pid(file->f_owner.pid);
178 file_kill(file); 178 file_kill(file);
179 file->f_dentry = NULL; 179 file->f_path.dentry = NULL;
180 file->f_vfsmnt = NULL; 180 file->f_path.mnt = NULL;
181 file_free(file); 181 file_free(file);
182 dput(dentry); 182 dput(dentry);
183 mntput(mnt); 183 mntput(mnt);
@@ -271,7 +271,7 @@ int fs_may_remount_ro(struct super_block *sb)
271 file_list_lock(); 271 file_list_lock();
272 list_for_each(p, &sb->s_files) { 272 list_for_each(p, &sb->s_files) {
273 struct file *file = list_entry(p, struct file, f_u.fu_list); 273 struct file *file = list_entry(p, struct file, f_u.fu_list);
274 struct inode *inode = file->f_dentry->d_inode; 274 struct inode *inode = file->f_path.dentry->d_inode;
275 275
276 /* File with pending delete? */ 276 /* File with pending delete? */
277 if (inode->i_nlink == 0) 277 if (inode->i_nlink == 0)
diff --git a/fs/inode.c b/fs/inode.c
index 9ecccab7326d..d00de182ecb9 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1200,7 +1200,7 @@ EXPORT_SYMBOL(touch_atime);
1200 1200
1201void file_update_time(struct file *file) 1201void file_update_time(struct file *file)
1202{ 1202{
1203 struct inode *inode = file->f_dentry->d_inode; 1203 struct inode *inode = file->f_path.dentry->d_inode;
1204 struct timespec now; 1204 struct timespec now;
1205 int sync_it = 0; 1205 int sync_it = 0;
1206 1206
diff --git a/fs/inotify_user.c b/fs/inotify_user.c
index e1956e6f116c..55f6da55b7c0 100644
--- a/fs/inotify_user.c
+++ b/fs/inotify_user.c
@@ -570,9 +570,9 @@ asmlinkage long sys_inotify_init(void)
570 dev->ih = ih; 570 dev->ih = ih;
571 571
572 filp->f_op = &inotify_fops; 572 filp->f_op = &inotify_fops;
573 filp->f_vfsmnt = mntget(inotify_mnt); 573 filp->f_path.mnt = mntget(inotify_mnt);
574 filp->f_dentry = dget(inotify_mnt->mnt_root); 574 filp->f_path.dentry = dget(inotify_mnt->mnt_root);
575 filp->f_mapping = filp->f_dentry->d_inode->i_mapping; 575 filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping;
576 filp->f_mode = FMODE_READ; 576 filp->f_mode = FMODE_READ;
577 filp->f_flags = O_RDONLY; 577 filp->f_flags = O_RDONLY;
578 filp->private_data = dev; 578 filp->private_data = dev;
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 4b7660b09ac0..ff61772ceedd 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -31,7 +31,7 @@ static long do_ioctl(struct file *filp, unsigned int cmd,
31 goto out; 31 goto out;
32 } else if (filp->f_op->ioctl) { 32 } else if (filp->f_op->ioctl) {
33 lock_kernel(); 33 lock_kernel();
34 error = filp->f_op->ioctl(filp->f_dentry->d_inode, 34 error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
35 filp, cmd, arg); 35 filp, cmd, arg);
36 unlock_kernel(); 36 unlock_kernel();
37 } 37 }
@@ -45,7 +45,7 @@ static int file_ioctl(struct file *filp, unsigned int cmd,
45{ 45{
46 int error; 46 int error;
47 int block; 47 int block;
48 struct inode * inode = filp->f_dentry->d_inode; 48 struct inode * inode = filp->f_path.dentry->d_inode;
49 int __user *p = (int __user *)arg; 49 int __user *p = (int __user *)arg;
50 50
51 switch (cmd) { 51 switch (cmd) {
@@ -137,17 +137,17 @@ int vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, unsigned lon
137 break; 137 break;
138 138
139 case FIOQSIZE: 139 case FIOQSIZE:
140 if (S_ISDIR(filp->f_dentry->d_inode->i_mode) || 140 if (S_ISDIR(filp->f_path.dentry->d_inode->i_mode) ||
141 S_ISREG(filp->f_dentry->d_inode->i_mode) || 141 S_ISREG(filp->f_path.dentry->d_inode->i_mode) ||
142 S_ISLNK(filp->f_dentry->d_inode->i_mode)) { 142 S_ISLNK(filp->f_path.dentry->d_inode->i_mode)) {
143 loff_t res = inode_get_bytes(filp->f_dentry->d_inode); 143 loff_t res = inode_get_bytes(filp->f_path.dentry->d_inode);
144 error = copy_to_user((loff_t __user *)arg, &res, sizeof(res)) ? -EFAULT : 0; 144 error = copy_to_user((loff_t __user *)arg, &res, sizeof(res)) ? -EFAULT : 0;
145 } 145 }
146 else 146 else
147 error = -ENOTTY; 147 error = -ENOTTY;
148 break; 148 break;
149 default: 149 default:
150 if (S_ISREG(filp->f_dentry->d_inode->i_mode)) 150 if (S_ISREG(filp->f_path.dentry->d_inode->i_mode))
151 error = file_ioctl(filp, cmd, arg); 151 error = file_ioctl(filp, cmd, arg);
152 else 152 else
153 error = do_ioctl(filp, cmd, arg); 153 error = do_ioctl(filp, cmd, arg);
diff --git a/fs/libfs.c b/fs/libfs.c
index bd08e0e64a8c..503898d5c4a7 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -63,7 +63,7 @@ int dcache_dir_open(struct inode *inode, struct file *file)
63{ 63{
64 static struct qstr cursor_name = {.len = 1, .name = "."}; 64 static struct qstr cursor_name = {.len = 1, .name = "."};
65 65
66 file->private_data = d_alloc(file->f_dentry, &cursor_name); 66 file->private_data = d_alloc(file->f_path.dentry, &cursor_name);
67 67
68 return file->private_data ? 0 : -ENOMEM; 68 return file->private_data ? 0 : -ENOMEM;
69} 69}
@@ -76,7 +76,7 @@ int dcache_dir_close(struct inode *inode, struct file *file)
76 76
77loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) 77loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
78{ 78{
79 mutex_lock(&file->f_dentry->d_inode->i_mutex); 79 mutex_lock(&file->f_path.dentry->d_inode->i_mutex);
80 switch (origin) { 80 switch (origin) {
81 case 1: 81 case 1:
82 offset += file->f_pos; 82 offset += file->f_pos;
@@ -84,7 +84,7 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
84 if (offset >= 0) 84 if (offset >= 0)
85 break; 85 break;
86 default: 86 default:
87 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 87 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
88 return -EINVAL; 88 return -EINVAL;
89 } 89 }
90 if (offset != file->f_pos) { 90 if (offset != file->f_pos) {
@@ -96,8 +96,8 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
96 96
97 spin_lock(&dcache_lock); 97 spin_lock(&dcache_lock);
98 list_del(&cursor->d_u.d_child); 98 list_del(&cursor->d_u.d_child);
99 p = file->f_dentry->d_subdirs.next; 99 p = file->f_path.dentry->d_subdirs.next;
100 while (n && p != &file->f_dentry->d_subdirs) { 100 while (n && p != &file->f_path.dentry->d_subdirs) {
101 struct dentry *next; 101 struct dentry *next;
102 next = list_entry(p, struct dentry, d_u.d_child); 102 next = list_entry(p, struct dentry, d_u.d_child);
103 if (!d_unhashed(next) && next->d_inode) 103 if (!d_unhashed(next) && next->d_inode)
@@ -108,7 +108,7 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
108 spin_unlock(&dcache_lock); 108 spin_unlock(&dcache_lock);
109 } 109 }
110 } 110 }
111 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 111 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
112 return offset; 112 return offset;
113} 113}
114 114
@@ -126,7 +126,7 @@ static inline unsigned char dt_type(struct inode *inode)
126 126
127int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) 127int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir)
128{ 128{
129 struct dentry *dentry = filp->f_dentry; 129 struct dentry *dentry = filp->f_path.dentry;
130 struct dentry *cursor = filp->private_data; 130 struct dentry *cursor = filp->private_data;
131 struct list_head *p, *q = &cursor->d_u.d_child; 131 struct list_head *p, *q = &cursor->d_u.d_child;
132 ino_t ino; 132 ino_t ino;
diff --git a/fs/locks.c b/fs/locks.c
index 1cb0c57fedbd..52a81005dab4 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -321,7 +321,7 @@ static int flock_to_posix_lock(struct file *filp, struct file_lock *fl,
321 start = filp->f_pos; 321 start = filp->f_pos;
322 break; 322 break;
323 case SEEK_END: 323 case SEEK_END:
324 start = i_size_read(filp->f_dentry->d_inode); 324 start = i_size_read(filp->f_path.dentry->d_inode);
325 break; 325 break;
326 default: 326 default:
327 return -EINVAL; 327 return -EINVAL;
@@ -371,7 +371,7 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl,
371 start = filp->f_pos; 371 start = filp->f_pos;
372 break; 372 break;
373 case SEEK_END: 373 case SEEK_END:
374 start = i_size_read(filp->f_dentry->d_inode); 374 start = i_size_read(filp->f_path.dentry->d_inode);
375 break; 375 break;
376 default: 376 default:
377 return -EINVAL; 377 return -EINVAL;
@@ -672,7 +672,7 @@ posix_test_lock(struct file *filp, struct file_lock *fl,
672 struct file_lock *cfl; 672 struct file_lock *cfl;
673 673
674 lock_kernel(); 674 lock_kernel();
675 for (cfl = filp->f_dentry->d_inode->i_flock; cfl; cfl = cfl->fl_next) { 675 for (cfl = filp->f_path.dentry->d_inode->i_flock; cfl; cfl = cfl->fl_next) {
676 if (!IS_POSIX(cfl)) 676 if (!IS_POSIX(cfl))
677 continue; 677 continue;
678 if (posix_locks_conflict(cfl, fl)) 678 if (posix_locks_conflict(cfl, fl))
@@ -734,7 +734,7 @@ static int flock_lock_file(struct file *filp, struct file_lock *request)
734{ 734{
735 struct file_lock *new_fl = NULL; 735 struct file_lock *new_fl = NULL;
736 struct file_lock **before; 736 struct file_lock **before;
737 struct inode * inode = filp->f_dentry->d_inode; 737 struct inode * inode = filp->f_path.dentry->d_inode;
738 int error = 0; 738 int error = 0;
739 int found = 0; 739 int found = 0;
740 740
@@ -1018,7 +1018,7 @@ static int __posix_lock_file_conf(struct inode *inode, struct file_lock *request
1018 */ 1018 */
1019int posix_lock_file(struct file *filp, struct file_lock *fl) 1019int posix_lock_file(struct file *filp, struct file_lock *fl)
1020{ 1020{
1021 return __posix_lock_file_conf(filp->f_dentry->d_inode, fl, NULL); 1021 return __posix_lock_file_conf(filp->f_path.dentry->d_inode, fl, NULL);
1022} 1022}
1023EXPORT_SYMBOL(posix_lock_file); 1023EXPORT_SYMBOL(posix_lock_file);
1024 1024
@@ -1033,7 +1033,7 @@ EXPORT_SYMBOL(posix_lock_file);
1033int posix_lock_file_conf(struct file *filp, struct file_lock *fl, 1033int posix_lock_file_conf(struct file *filp, struct file_lock *fl,
1034 struct file_lock *conflock) 1034 struct file_lock *conflock)
1035{ 1035{
1036 return __posix_lock_file_conf(filp->f_dentry->d_inode, fl, conflock); 1036 return __posix_lock_file_conf(filp->f_path.dentry->d_inode, fl, conflock);
1037} 1037}
1038EXPORT_SYMBOL(posix_lock_file_conf); 1038EXPORT_SYMBOL(posix_lock_file_conf);
1039 1039
@@ -1333,8 +1333,8 @@ int fcntl_getlease(struct file *filp)
1333 int type = F_UNLCK; 1333 int type = F_UNLCK;
1334 1334
1335 lock_kernel(); 1335 lock_kernel();
1336 time_out_leases(filp->f_dentry->d_inode); 1336 time_out_leases(filp->f_path.dentry->d_inode);
1337 for (fl = filp->f_dentry->d_inode->i_flock; fl && IS_LEASE(fl); 1337 for (fl = filp->f_path.dentry->d_inode->i_flock; fl && IS_LEASE(fl);
1338 fl = fl->fl_next) { 1338 fl = fl->fl_next) {
1339 if (fl->fl_file == filp) { 1339 if (fl->fl_file == filp) {
1340 type = fl->fl_type & ~F_INPROGRESS; 1340 type = fl->fl_type & ~F_INPROGRESS;
@@ -1359,7 +1359,7 @@ int fcntl_getlease(struct file *filp)
1359static int __setlease(struct file *filp, long arg, struct file_lock **flp) 1359static int __setlease(struct file *filp, long arg, struct file_lock **flp)
1360{ 1360{
1361 struct file_lock *fl, **before, **my_before = NULL, *lease; 1361 struct file_lock *fl, **before, **my_before = NULL, *lease;
1362 struct dentry *dentry = filp->f_dentry; 1362 struct dentry *dentry = filp->f_path.dentry;
1363 struct inode *inode = dentry->d_inode; 1363 struct inode *inode = dentry->d_inode;
1364 int error, rdlease_count = 0, wrlease_count = 0; 1364 int error, rdlease_count = 0, wrlease_count = 0;
1365 1365
@@ -1448,7 +1448,7 @@ out:
1448 1448
1449int setlease(struct file *filp, long arg, struct file_lock **lease) 1449int setlease(struct file *filp, long arg, struct file_lock **lease)
1450{ 1450{
1451 struct dentry *dentry = filp->f_dentry; 1451 struct dentry *dentry = filp->f_path.dentry;
1452 struct inode *inode = dentry->d_inode; 1452 struct inode *inode = dentry->d_inode;
1453 int error; 1453 int error;
1454 1454
@@ -1482,7 +1482,7 @@ EXPORT_SYMBOL(setlease);
1482int fcntl_setlease(unsigned int fd, struct file *filp, long arg) 1482int fcntl_setlease(unsigned int fd, struct file *filp, long arg)
1483{ 1483{
1484 struct file_lock fl, *flp = &fl; 1484 struct file_lock fl, *flp = &fl;
1485 struct dentry *dentry = filp->f_dentry; 1485 struct dentry *dentry = filp->f_path.dentry;
1486 struct inode *inode = dentry->d_inode; 1486 struct inode *inode = dentry->d_inode;
1487 int error; 1487 int error;
1488 1488
@@ -1692,7 +1692,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
1692 if (copy_from_user(&flock, l, sizeof(flock))) 1692 if (copy_from_user(&flock, l, sizeof(flock)))
1693 goto out; 1693 goto out;
1694 1694
1695 inode = filp->f_dentry->d_inode; 1695 inode = filp->f_path.dentry->d_inode;
1696 1696
1697 /* Don't allow mandatory locks on files that may be memory mapped 1697 /* Don't allow mandatory locks on files that may be memory mapped
1698 * and shared. 1698 * and shared.
@@ -1835,7 +1835,7 @@ int fcntl_setlk64(unsigned int fd, struct file *filp, unsigned int cmd,
1835 if (copy_from_user(&flock, l, sizeof(flock))) 1835 if (copy_from_user(&flock, l, sizeof(flock)))
1836 goto out; 1836 goto out;
1837 1837
1838 inode = filp->f_dentry->d_inode; 1838 inode = filp->f_path.dentry->d_inode;
1839 1839
1840 /* Don't allow mandatory locks on files that may be memory mapped 1840 /* Don't allow mandatory locks on files that may be memory mapped
1841 * and shared. 1841 * and shared.
@@ -1922,7 +1922,7 @@ void locks_remove_posix(struct file *filp, fl_owner_t owner)
1922 * posix_lock_file(). Another process could be setting a lock on this 1922 * posix_lock_file(). Another process could be setting a lock on this
1923 * file at the same time, but we wouldn't remove that lock anyway. 1923 * file at the same time, but we wouldn't remove that lock anyway.
1924 */ 1924 */
1925 if (!filp->f_dentry->d_inode->i_flock) 1925 if (!filp->f_path.dentry->d_inode->i_flock)
1926 return; 1926 return;
1927 1927
1928 lock.fl_type = F_UNLCK; 1928 lock.fl_type = F_UNLCK;
@@ -1951,7 +1951,7 @@ EXPORT_SYMBOL(locks_remove_posix);
1951 */ 1951 */
1952void locks_remove_flock(struct file *filp) 1952void locks_remove_flock(struct file *filp)
1953{ 1953{
1954 struct inode * inode = filp->f_dentry->d_inode; 1954 struct inode * inode = filp->f_path.dentry->d_inode;
1955 struct file_lock *fl; 1955 struct file_lock *fl;
1956 struct file_lock **before; 1956 struct file_lock **before;
1957 1957
@@ -2020,7 +2020,7 @@ static void lock_get_status(char* out, struct file_lock *fl, int id, char *pfx)
2020 struct inode *inode = NULL; 2020 struct inode *inode = NULL;
2021 2021
2022 if (fl->fl_file != NULL) 2022 if (fl->fl_file != NULL)
2023 inode = fl->fl_file->f_dentry->d_inode; 2023 inode = fl->fl_file->f_path.dentry->d_inode;
2024 2024
2025 out += sprintf(out, "%d:%s ", id, pfx); 2025 out += sprintf(out, "%d:%s ", id, pfx);
2026 if (IS_POSIX(fl)) { 2026 if (IS_POSIX(fl)) {
diff --git a/fs/namei.c b/fs/namei.c
index 8c2db88bb20d..e4f108f08230 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -297,7 +297,7 @@ int vfs_permission(struct nameidata *nd, int mask)
297 */ 297 */
298int file_permission(struct file *file, int mask) 298int file_permission(struct file *file, int mask)
299{ 299{
300 return permission(file->f_dentry->d_inode, mask, NULL); 300 return permission(file->f_path.dentry->d_inode, mask, NULL);
301} 301}
302 302
303/* 303/*
@@ -333,7 +333,7 @@ int get_write_access(struct inode * inode)
333 333
334int deny_write_access(struct file * file) 334int deny_write_access(struct file * file)
335{ 335{
336 struct inode *inode = file->f_dentry->d_inode; 336 struct inode *inode = file->f_path.dentry->d_inode;
337 337
338 spin_lock(&inode->i_lock); 338 spin_lock(&inode->i_lock);
339 if (atomic_read(&inode->i_writecount) > 0) { 339 if (atomic_read(&inode->i_writecount) > 0) {
@@ -368,7 +368,7 @@ void path_release_on_umount(struct nameidata *nd)
368 */ 368 */
369void release_open_intent(struct nameidata *nd) 369void release_open_intent(struct nameidata *nd)
370{ 370{
371 if (nd->intent.open.file->f_dentry == NULL) 371 if (nd->intent.open.file->f_path.dentry == NULL)
372 put_filp(nd->intent.open.file); 372 put_filp(nd->intent.open.file);
373 else 373 else
374 fput(nd->intent.open.file); 374 fput(nd->intent.open.file);
@@ -1138,7 +1138,7 @@ static int fastcall do_path_lookup(int dfd, const char *name,
1138 if (!file) 1138 if (!file)
1139 goto out_fail; 1139 goto out_fail;
1140 1140
1141 dentry = file->f_dentry; 1141 dentry = file->f_path.dentry;
1142 1142
1143 retval = -ENOTDIR; 1143 retval = -ENOTDIR;
1144 if (!S_ISDIR(dentry->d_inode->i_mode)) 1144 if (!S_ISDIR(dentry->d_inode->i_mode))
@@ -1148,7 +1148,7 @@ static int fastcall do_path_lookup(int dfd, const char *name,
1148 if (retval) 1148 if (retval)
1149 goto fput_fail; 1149 goto fput_fail;
1150 1150
1151 nd->mnt = mntget(file->f_vfsmnt); 1151 nd->mnt = mntget(file->f_path.mnt);
1152 nd->dentry = dget(dentry); 1152 nd->dentry = dget(dentry);
1153 1153
1154 fput_light(file, fput_needed); 1154 fput_light(file, fput_needed);
diff --git a/fs/open.c b/fs/open.c
index 3b56192816ca..0d94319e8681 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -165,7 +165,7 @@ asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user * buf)
165 file = fget(fd); 165 file = fget(fd);
166 if (!file) 166 if (!file)
167 goto out; 167 goto out;
168 error = vfs_statfs_native(file->f_dentry, &tmp); 168 error = vfs_statfs_native(file->f_path.dentry, &tmp);
169 if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) 169 if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
170 error = -EFAULT; 170 error = -EFAULT;
171 fput(file); 171 fput(file);
@@ -186,7 +186,7 @@ asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, struct statfs64 __user
186 file = fget(fd); 186 file = fget(fd);
187 if (!file) 187 if (!file)
188 goto out; 188 goto out;
189 error = vfs_statfs64(file->f_dentry, &tmp); 189 error = vfs_statfs64(file->f_path.dentry, &tmp);
190 if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) 190 if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
191 error = -EFAULT; 191 error = -EFAULT;
192 fput(file); 192 fput(file);
@@ -302,7 +302,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
302 if (file->f_flags & O_LARGEFILE) 302 if (file->f_flags & O_LARGEFILE)
303 small = 0; 303 small = 0;
304 304
305 dentry = file->f_dentry; 305 dentry = file->f_path.dentry;
306 inode = dentry->d_inode; 306 inode = dentry->d_inode;
307 error = -EINVAL; 307 error = -EINVAL;
308 if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE)) 308 if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE))
@@ -448,8 +448,8 @@ asmlinkage long sys_fchdir(unsigned int fd)
448 if (!file) 448 if (!file)
449 goto out; 449 goto out;
450 450
451 dentry = file->f_dentry; 451 dentry = file->f_path.dentry;
452 mnt = file->f_vfsmnt; 452 mnt = file->f_path.mnt;
453 inode = dentry->d_inode; 453 inode = dentry->d_inode;
454 454
455 error = -ENOTDIR; 455 error = -ENOTDIR;
@@ -503,7 +503,7 @@ asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
503 if (!file) 503 if (!file)
504 goto out; 504 goto out;
505 505
506 dentry = file->f_dentry; 506 dentry = file->f_path.dentry;
507 inode = dentry->d_inode; 507 inode = dentry->d_inode;
508 508
509 audit_inode(NULL, inode); 509 audit_inode(NULL, inode);
@@ -662,7 +662,7 @@ asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group)
662 if (!file) 662 if (!file)
663 goto out; 663 goto out;
664 664
665 dentry = file->f_dentry; 665 dentry = file->f_path.dentry;
666 audit_inode(NULL, dentry->d_inode); 666 audit_inode(NULL, dentry->d_inode);
667 error = chown_common(dentry, user, group); 667 error = chown_common(dentry, user, group);
668 fput(file); 668 fput(file);
@@ -688,8 +688,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
688 } 688 }
689 689
690 f->f_mapping = inode->i_mapping; 690 f->f_mapping = inode->i_mapping;
691 f->f_dentry = dentry; 691 f->f_path.dentry = dentry;
692 f->f_vfsmnt = mnt; 692 f->f_path.mnt = mnt;
693 f->f_pos = 0; 693 f->f_pos = 0;
694 f->f_op = fops_get(inode->i_fop); 694 f->f_op = fops_get(inode->i_fop);
695 file_move(f, &inode->i_sb->s_files); 695 file_move(f, &inode->i_sb->s_files);
@@ -723,8 +723,8 @@ cleanup_all:
723 if (f->f_mode & FMODE_WRITE) 723 if (f->f_mode & FMODE_WRITE)
724 put_write_access(inode); 724 put_write_access(inode);
725 file_kill(f); 725 file_kill(f);
726 f->f_dentry = NULL; 726 f->f_path.dentry = NULL;
727 f->f_vfsmnt = NULL; 727 f->f_path.mnt = NULL;
728cleanup_file: 728cleanup_file:
729 put_filp(f); 729 put_filp(f);
730 dput(dentry); 730 dput(dentry);
@@ -822,7 +822,7 @@ struct file *nameidata_to_filp(struct nameidata *nd, int flags)
822 /* Pick up the filp from the open intent */ 822 /* Pick up the filp from the open intent */
823 filp = nd->intent.open.file; 823 filp = nd->intent.open.file;
824 /* Has the filesystem initialised the file for us? */ 824 /* Has the filesystem initialised the file for us? */
825 if (filp->f_dentry == NULL) 825 if (filp->f_path.dentry == NULL)
826 filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL); 826 filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL);
827 else 827 else
828 path_release(nd); 828 path_release(nd);
@@ -965,7 +965,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
965 put_unused_fd(fd); 965 put_unused_fd(fd);
966 fd = PTR_ERR(f); 966 fd = PTR_ERR(f);
967 } else { 967 } else {
968 fsnotify_open(f->f_dentry); 968 fsnotify_open(f->f_path.dentry);
969 fd_install(fd, f); 969 fd_install(fd, f);
970 } 970 }
971 } 971 }
diff --git a/fs/pipe.c b/fs/pipe.c
index ae36b89b1a37..f8b6bdcb879a 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -222,7 +222,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
222 unsigned long nr_segs, loff_t pos) 222 unsigned long nr_segs, loff_t pos)
223{ 223{
224 struct file *filp = iocb->ki_filp; 224 struct file *filp = iocb->ki_filp;
225 struct inode *inode = filp->f_dentry->d_inode; 225 struct inode *inode = filp->f_path.dentry->d_inode;
226 struct pipe_inode_info *pipe; 226 struct pipe_inode_info *pipe;
227 int do_wakeup; 227 int do_wakeup;
228 ssize_t ret; 228 ssize_t ret;
@@ -335,7 +335,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
335 unsigned long nr_segs, loff_t ppos) 335 unsigned long nr_segs, loff_t ppos)
336{ 336{
337 struct file *filp = iocb->ki_filp; 337 struct file *filp = iocb->ki_filp;
338 struct inode *inode = filp->f_dentry->d_inode; 338 struct inode *inode = filp->f_path.dentry->d_inode;
339 struct pipe_inode_info *pipe; 339 struct pipe_inode_info *pipe;
340 ssize_t ret; 340 ssize_t ret;
341 int do_wakeup; 341 int do_wakeup;
@@ -520,7 +520,7 @@ static int
520pipe_ioctl(struct inode *pino, struct file *filp, 520pipe_ioctl(struct inode *pino, struct file *filp,
521 unsigned int cmd, unsigned long arg) 521 unsigned int cmd, unsigned long arg)
522{ 522{
523 struct inode *inode = filp->f_dentry->d_inode; 523 struct inode *inode = filp->f_path.dentry->d_inode;
524 struct pipe_inode_info *pipe; 524 struct pipe_inode_info *pipe;
525 int count, buf, nrbufs; 525 int count, buf, nrbufs;
526 526
@@ -548,7 +548,7 @@ static unsigned int
548pipe_poll(struct file *filp, poll_table *wait) 548pipe_poll(struct file *filp, poll_table *wait)
549{ 549{
550 unsigned int mask; 550 unsigned int mask;
551 struct inode *inode = filp->f_dentry->d_inode; 551 struct inode *inode = filp->f_path.dentry->d_inode;
552 struct pipe_inode_info *pipe = inode->i_pipe; 552 struct pipe_inode_info *pipe = inode->i_pipe;
553 int nrbufs; 553 int nrbufs;
554 554
@@ -601,7 +601,7 @@ pipe_release(struct inode *inode, int decr, int decw)
601static int 601static int
602pipe_read_fasync(int fd, struct file *filp, int on) 602pipe_read_fasync(int fd, struct file *filp, int on)
603{ 603{
604 struct inode *inode = filp->f_dentry->d_inode; 604 struct inode *inode = filp->f_path.dentry->d_inode;
605 int retval; 605 int retval;
606 606
607 mutex_lock(&inode->i_mutex); 607 mutex_lock(&inode->i_mutex);
@@ -618,7 +618,7 @@ pipe_read_fasync(int fd, struct file *filp, int on)
618static int 618static int
619pipe_write_fasync(int fd, struct file *filp, int on) 619pipe_write_fasync(int fd, struct file *filp, int on)
620{ 620{
621 struct inode *inode = filp->f_dentry->d_inode; 621 struct inode *inode = filp->f_path.dentry->d_inode;
622 int retval; 622 int retval;
623 623
624 mutex_lock(&inode->i_mutex); 624 mutex_lock(&inode->i_mutex);
@@ -635,7 +635,7 @@ pipe_write_fasync(int fd, struct file *filp, int on)
635static int 635static int
636pipe_rdwr_fasync(int fd, struct file *filp, int on) 636pipe_rdwr_fasync(int fd, struct file *filp, int on)
637{ 637{
638 struct inode *inode = filp->f_dentry->d_inode; 638 struct inode *inode = filp->f_path.dentry->d_inode;
639 struct pipe_inode_info *pipe = inode->i_pipe; 639 struct pipe_inode_info *pipe = inode->i_pipe;
640 int retval; 640 int retval;
641 641
@@ -914,8 +914,8 @@ struct file *create_write_pipe(void)
914 */ 914 */
915 dentry->d_flags &= ~DCACHE_UNHASHED; 915 dentry->d_flags &= ~DCACHE_UNHASHED;
916 d_instantiate(dentry, inode); 916 d_instantiate(dentry, inode);
917 f->f_vfsmnt = mntget(pipe_mnt); 917 f->f_path.mnt = mntget(pipe_mnt);
918 f->f_dentry = dentry; 918 f->f_path.dentry = dentry;
919 f->f_mapping = inode->i_mapping; 919 f->f_mapping = inode->i_mapping;
920 920
921 f->f_flags = O_WRONLY; 921 f->f_flags = O_WRONLY;
@@ -935,8 +935,8 @@ struct file *create_write_pipe(void)
935 935
936void free_write_pipe(struct file *f) 936void free_write_pipe(struct file *f)
937{ 937{
938 mntput(f->f_vfsmnt); 938 mntput(f->f_path.mnt);
939 dput(f->f_dentry); 939 dput(f->f_path.dentry);
940 put_filp(f); 940 put_filp(f);
941} 941}
942 942
@@ -947,9 +947,9 @@ struct file *create_read_pipe(struct file *wrf)
947 return ERR_PTR(-ENFILE); 947 return ERR_PTR(-ENFILE);
948 948
949 /* Grab pipe from the writer */ 949 /* Grab pipe from the writer */
950 f->f_vfsmnt = mntget(wrf->f_vfsmnt); 950 f->f_path.mnt = mntget(wrf->f_path.mnt);
951 f->f_dentry = dget(wrf->f_dentry); 951 f->f_path.dentry = dget(wrf->f_path.dentry);
952 f->f_mapping = wrf->f_dentry->d_inode->i_mapping; 952 f->f_mapping = wrf->f_path.dentry->d_inode->i_mapping;
953 953
954 f->f_pos = 0; 954 f->f_pos = 0;
955 f->f_flags = O_RDONLY; 955 f->f_flags = O_RDONLY;
diff --git a/fs/read_write.c b/fs/read_write.c
index f792000a28e6..1d3dda4fa70c 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -64,13 +64,13 @@ loff_t remote_llseek(struct file *file, loff_t offset, int origin)
64 lock_kernel(); 64 lock_kernel();
65 switch (origin) { 65 switch (origin) {
66 case 2: 66 case 2:
67 offset += i_size_read(file->f_dentry->d_inode); 67 offset += i_size_read(file->f_path.dentry->d_inode);
68 break; 68 break;
69 case 1: 69 case 1:
70 offset += file->f_pos; 70 offset += file->f_pos;
71 } 71 }
72 retval = -EINVAL; 72 retval = -EINVAL;
73 if (offset>=0 && offset<=file->f_dentry->d_inode->i_sb->s_maxbytes) { 73 if (offset>=0 && offset<=file->f_path.dentry->d_inode->i_sb->s_maxbytes) {
74 if (offset != file->f_pos) { 74 if (offset != file->f_pos) {
75 file->f_pos = offset; 75 file->f_pos = offset;
76 file->f_version = 0; 76 file->f_version = 0;
@@ -95,7 +95,7 @@ loff_t default_llseek(struct file *file, loff_t offset, int origin)
95 lock_kernel(); 95 lock_kernel();
96 switch (origin) { 96 switch (origin) {
97 case 2: 97 case 2:
98 offset += i_size_read(file->f_dentry->d_inode); 98 offset += i_size_read(file->f_path.dentry->d_inode);
99 break; 99 break;
100 case 1: 100 case 1:
101 offset += file->f_pos; 101 offset += file->f_pos;
@@ -203,7 +203,7 @@ int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count
203 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) 203 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0))
204 goto Einval; 204 goto Einval;
205 205
206 inode = file->f_dentry->d_inode; 206 inode = file->f_path.dentry->d_inode;
207 if (unlikely(inode->i_flock && MANDATORY_LOCK(inode))) { 207 if (unlikely(inode->i_flock && MANDATORY_LOCK(inode))) {
208 int retval = locks_mandatory_area( 208 int retval = locks_mandatory_area(
209 read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE, 209 read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE,
@@ -273,7 +273,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
273 else 273 else
274 ret = do_sync_read(file, buf, count, pos); 274 ret = do_sync_read(file, buf, count, pos);
275 if (ret > 0) { 275 if (ret > 0) {
276 fsnotify_access(file->f_dentry); 276 fsnotify_access(file->f_path.dentry);
277 current->rchar += ret; 277 current->rchar += ret;
278 } 278 }
279 current->syscr++; 279 current->syscr++;
@@ -331,7 +331,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
331 else 331 else
332 ret = do_sync_write(file, buf, count, pos); 332 ret = do_sync_write(file, buf, count, pos);
333 if (ret > 0) { 333 if (ret > 0) {
334 fsnotify_modify(file->f_dentry); 334 fsnotify_modify(file->f_path.dentry);
335 current->wchar += ret; 335 current->wchar += ret;
336 } 336 }
337 current->syscw++; 337 current->syscw++;
@@ -628,9 +628,9 @@ out:
628 kfree(iov); 628 kfree(iov);
629 if ((ret + (type == READ)) > 0) { 629 if ((ret + (type == READ)) > 0) {
630 if (type == READ) 630 if (type == READ)
631 fsnotify_access(file->f_dentry); 631 fsnotify_access(file->f_path.dentry);
632 else 632 else
633 fsnotify_modify(file->f_dentry); 633 fsnotify_modify(file->f_path.dentry);
634 } 634 }
635 return ret; 635 return ret;
636} 636}
@@ -722,7 +722,7 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
722 if (!(in_file->f_mode & FMODE_READ)) 722 if (!(in_file->f_mode & FMODE_READ))
723 goto fput_in; 723 goto fput_in;
724 retval = -EINVAL; 724 retval = -EINVAL;
725 in_inode = in_file->f_dentry->d_inode; 725 in_inode = in_file->f_path.dentry->d_inode;
726 if (!in_inode) 726 if (!in_inode)
727 goto fput_in; 727 goto fput_in;
728 if (!in_file->f_op || !in_file->f_op->sendfile) 728 if (!in_file->f_op || !in_file->f_op->sendfile)
@@ -754,7 +754,7 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
754 retval = -EINVAL; 754 retval = -EINVAL;
755 if (!out_file->f_op || !out_file->f_op->sendpage) 755 if (!out_file->f_op || !out_file->f_op->sendpage)
756 goto fput_out; 756 goto fput_out;
757 out_inode = out_file->f_dentry->d_inode; 757 out_inode = out_file->f_path.dentry->d_inode;
758 retval = rw_verify_area(WRITE, out_file, &out_file->f_pos, count); 758 retval = rw_verify_area(WRITE, out_file, &out_file->f_pos, count);
759 if (retval < 0) 759 if (retval < 0)
760 goto fput_out; 760 goto fput_out;
diff --git a/fs/readdir.c b/fs/readdir.c
index bff3ee58e2f8..f39f5b313252 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -21,7 +21,7 @@
21 21
22int vfs_readdir(struct file *file, filldir_t filler, void *buf) 22int vfs_readdir(struct file *file, filldir_t filler, void *buf)
23{ 23{
24 struct inode *inode = file->f_dentry->d_inode; 24 struct inode *inode = file->f_path.dentry->d_inode;
25 int res = -ENOTDIR; 25 int res = -ENOTDIR;
26 if (!file->f_op || !file->f_op->readdir) 26 if (!file->f_op || !file->f_op->readdir)
27 goto out; 27 goto out;
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 10690aa401c7..0ac22af7afe5 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -269,7 +269,7 @@ EXPORT_SYMBOL(seq_lseek);
269/** 269/**
270 * seq_release - free the structures associated with sequential file. 270 * seq_release - free the structures associated with sequential file.
271 * @file: file in question 271 * @file: file in question
272 * @inode: file->f_dentry->d_inode 272 * @inode: file->f_path.dentry->d_inode
273 * 273 *
274 * Frees the structures associated with sequential file; can be used 274 * Frees the structures associated with sequential file; can be used
275 * as ->f_op->release() if you don't have private data to destroy. 275 * as ->f_op->release() if you don't have private data to destroy.
diff --git a/fs/splice.c b/fs/splice.c
index da74583a00ee..bbd0aeb3f68e 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -844,7 +844,7 @@ generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out,
844 ssize_t ret; 844 ssize_t ret;
845 int err; 845 int err;
846 846
847 err = remove_suid(out->f_dentry); 847 err = remove_suid(out->f_path.dentry);
848 if (unlikely(err)) 848 if (unlikely(err))
849 return err; 849 return err;
850 850
@@ -890,10 +890,10 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
890 ssize_t ret; 890 ssize_t ret;
891 int err; 891 int err;
892 892
893 err = should_remove_suid(out->f_dentry); 893 err = should_remove_suid(out->f_path.dentry);
894 if (unlikely(err)) { 894 if (unlikely(err)) {
895 mutex_lock(&inode->i_mutex); 895 mutex_lock(&inode->i_mutex);
896 err = __remove_suid(out->f_dentry, err); 896 err = __remove_suid(out->f_path.dentry, err);
897 mutex_unlock(&inode->i_mutex); 897 mutex_unlock(&inode->i_mutex);
898 if (err) 898 if (err)
899 return err; 899 return err;
@@ -1008,7 +1008,7 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
1008 * randomly drop data for eg socket -> socket splicing. Use the 1008 * randomly drop data for eg socket -> socket splicing. Use the
1009 * piped splicing for that! 1009 * piped splicing for that!
1010 */ 1010 */
1011 i_mode = in->f_dentry->d_inode->i_mode; 1011 i_mode = in->f_path.dentry->d_inode->i_mode;
1012 if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode))) 1012 if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode)))
1013 return -EINVAL; 1013 return -EINVAL;
1014 1014
@@ -1132,7 +1132,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
1132 loff_t offset, *off; 1132 loff_t offset, *off;
1133 long ret; 1133 long ret;
1134 1134
1135 pipe = pipe_info(in->f_dentry->d_inode); 1135 pipe = pipe_info(in->f_path.dentry->d_inode);
1136 if (pipe) { 1136 if (pipe) {
1137 if (off_in) 1137 if (off_in)
1138 return -ESPIPE; 1138 return -ESPIPE;
@@ -1153,7 +1153,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
1153 return ret; 1153 return ret;
1154 } 1154 }
1155 1155
1156 pipe = pipe_info(out->f_dentry->d_inode); 1156 pipe = pipe_info(out->f_path.dentry->d_inode);
1157 if (pipe) { 1157 if (pipe) {
1158 if (off_out) 1158 if (off_out)
1159 return -ESPIPE; 1159 return -ESPIPE;
@@ -1321,7 +1321,7 @@ static long do_vmsplice(struct file *file, const struct iovec __user *iov,
1321 .ops = &user_page_pipe_buf_ops, 1321 .ops = &user_page_pipe_buf_ops,
1322 }; 1322 };
1323 1323
1324 pipe = pipe_info(file->f_dentry->d_inode); 1324 pipe = pipe_info(file->f_path.dentry->d_inode);
1325 if (!pipe) 1325 if (!pipe)
1326 return -EBADF; 1326 return -EBADF;
1327 if (unlikely(nr_segs > UIO_MAXIOV)) 1327 if (unlikely(nr_segs > UIO_MAXIOV))
@@ -1549,8 +1549,8 @@ static int link_pipe(struct pipe_inode_info *ipipe,
1549static long do_tee(struct file *in, struct file *out, size_t len, 1549static long do_tee(struct file *in, struct file *out, size_t len,
1550 unsigned int flags) 1550 unsigned int flags)
1551{ 1551{
1552 struct pipe_inode_info *ipipe = pipe_info(in->f_dentry->d_inode); 1552 struct pipe_inode_info *ipipe = pipe_info(in->f_path.dentry->d_inode);
1553 struct pipe_inode_info *opipe = pipe_info(out->f_dentry->d_inode); 1553 struct pipe_inode_info *opipe = pipe_info(out->f_path.dentry->d_inode);
1554 int ret = -EINVAL; 1554 int ret = -EINVAL;
1555 1555
1556 /* 1556 /*
diff --git a/fs/stat.c b/fs/stat.c
index a0ebfc7f8a64..38a8cb2a28de 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -102,7 +102,7 @@ int vfs_fstat(unsigned int fd, struct kstat *stat)
102 int error = -EBADF; 102 int error = -EBADF;
103 103
104 if (f) { 104 if (f) {
105 error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat); 105 error = vfs_getattr(f->f_path.mnt, f->f_path.dentry, stat);
106 fput(f); 106 fput(f);
107 } 107 }
108 return error; 108 return error;
diff --git a/fs/super.c b/fs/super.c
index 84c320f6ad7e..f961e0307997 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -570,7 +570,7 @@ static void mark_files_ro(struct super_block *sb)
570 570
571 file_list_lock(); 571 file_list_lock();
572 list_for_each_entry(f, &sb->s_files, f_u.fu_list) { 572 list_for_each_entry(f, &sb->s_files, f_u.fu_list) {
573 if (S_ISREG(f->f_dentry->d_inode->i_mode) && file_count(f)) 573 if (S_ISREG(f->f_path.dentry->d_inode->i_mode) && file_count(f))
574 f->f_mode &= ~FMODE_WRITE; 574 f->f_mode &= ~FMODE_WRITE;
575 } 575 }
576 file_list_unlock(); 576 file_list_unlock();
diff --git a/fs/sync.c b/fs/sync.c
index 865f32be386e..d0feff61e6aa 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -94,7 +94,7 @@ long do_fsync(struct file *file, int datasync)
94 * livelocks in fsync_buffers_list(). 94 * livelocks in fsync_buffers_list().
95 */ 95 */
96 mutex_lock(&mapping->host->i_mutex); 96 mutex_lock(&mapping->host->i_mutex);
97 err = file->f_op->fsync(file, file->f_dentry, datasync); 97 err = file->f_op->fsync(file, file->f_path.dentry, datasync);
98 if (!ret) 98 if (!ret)
99 ret = err; 99 ret = err;
100 mutex_unlock(&mapping->host->i_mutex); 100 mutex_unlock(&mapping->host->i_mutex);
@@ -223,7 +223,7 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
223 if (!file) 223 if (!file)
224 goto out; 224 goto out;
225 225
226 i_mode = file->f_dentry->d_inode->i_mode; 226 i_mode = file->f_path.dentry->d_inode->i_mode;
227 ret = -ESPIPE; 227 ret = -ESPIPE;
228 if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) && 228 if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) &&
229 !S_ISLNK(i_mode)) 229 !S_ISLNK(i_mode))
diff --git a/fs/xattr.c b/fs/xattr.c
index 0901bdc2ce24..38646132ab0e 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -268,7 +268,7 @@ sys_fsetxattr(int fd, char __user *name, void __user *value,
268 f = fget(fd); 268 f = fget(fd);
269 if (!f) 269 if (!f)
270 return error; 270 return error;
271 dentry = f->f_dentry; 271 dentry = f->f_path.dentry;
272 audit_inode(NULL, dentry->d_inode); 272 audit_inode(NULL, dentry->d_inode);
273 error = setxattr(dentry, name, value, size, flags); 273 error = setxattr(dentry, name, value, size, flags);
274 fput(f); 274 fput(f);
@@ -351,7 +351,7 @@ sys_fgetxattr(int fd, char __user *name, void __user *value, size_t size)
351 f = fget(fd); 351 f = fget(fd);
352 if (!f) 352 if (!f)
353 return error; 353 return error;
354 error = getxattr(f->f_dentry, name, value, size); 354 error = getxattr(f->f_path.dentry, name, value, size);
355 fput(f); 355 fput(f);
356 return error; 356 return error;
357} 357}
@@ -423,7 +423,7 @@ sys_flistxattr(int fd, char __user *list, size_t size)
423 f = fget(fd); 423 f = fget(fd);
424 if (!f) 424 if (!f)
425 return error; 425 return error;
426 error = listxattr(f->f_dentry, list, size); 426 error = listxattr(f->f_path.dentry, list, size);
427 fput(f); 427 fput(f);
428 return error; 428 return error;
429} 429}
@@ -484,7 +484,7 @@ sys_fremovexattr(int fd, char __user *name)
484 f = fget(fd); 484 f = fget(fd);
485 if (!f) 485 if (!f)
486 return error; 486 return error;
487 dentry = f->f_dentry; 487 dentry = f->f_path.dentry;
488 audit_inode(NULL, dentry->d_inode); 488 audit_inode(NULL, dentry->d_inode);
489 error = removexattr(dentry, name); 489 error = removexattr(dentry, name);
490 fput(f); 490 fput(f);