drivers/block/loop.c    |    7 +++----
 fs/block_dev.c          |    2 +-
 fs/ext2/inode.c         |    2 +-
 fs/ext3/inode.c         |    2 +-
 fs/jfs/inode.c          |    2 +-
 fs/read_write.c         |    2 +-
 fs/reiserfs/inode.c     |    2 +-
 fs/xfs/linux/xfs_aops.c |    2 +-
 fs/xfs/linux/xfs_file.c |    6 +++---
 include/linux/fs.h      |    2 +-
 mm/filemap.c            |   22 +++++++++++-----------
 mm/madvise.c            |    2 +-
 mm/memory.c             |    2 +-
 mm/mincore.c            |    2 +-
 mm/mmap.c               |    2 +-
 mm/swapfile.c           |   10 +++++-----
 16 files changed, 34 insertions(+), 35 deletions(-)

diff -puN drivers/block/loop.c~RD9-f_mapping2-B6 drivers/block/loop.c
--- 25/drivers/block/loop.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/drivers/block/loop.c	2003-10-03 22:12:32.000000000 -0700
@@ -140,8 +140,7 @@ figure_loop_size(struct loop_device *lo)
 	sector_t x;
 
 	/* Compute loopsize in bytes */
-	size = i_size_read(lo->lo_backing_file->f_dentry->
-				d_inode->i_mapping->host);
+	size = i_size_read(lo->lo_backing_file->f_mapping->host);
 	offset = lo->lo_offset;
 	loopsize = size - offset;
 	if (lo->lo_sizelimit > 0 && lo->lo_sizelimit < loopsize)
@@ -175,7 +174,7 @@ static int
 do_lo_send(struct loop_device *lo, struct bio_vec *bvec, int bsize, loff_t pos)
 {
 	struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	struct address_space_operations *aops = mapping->a_ops;
 	struct page *page;
 	char *kaddr, *data;
@@ -846,7 +845,7 @@ static int loop_clr_fd(struct loop_devic
 	memset(lo->lo_file_name, 0, LO_NAME_SIZE);
 	invalidate_bdev(bdev, 0);
 	set_capacity(disks[lo->lo_number], 0);
-	mapping_set_gfp_mask(filp->f_dentry->d_inode->i_mapping, gfp);
+	mapping_set_gfp_mask(filp->f_mapping, gfp);
 	lo->lo_state = Lo_unbound;
 	fput(filp);
 	/* This is safe: open() is still holding a reference. */
diff -puN fs/block_dev.c~RD9-f_mapping2-B6 fs/block_dev.c
--- 25/fs/block_dev.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/block_dev.c	2003-10-03 22:12:32.000000000 -0700
@@ -128,7 +128,7 @@ blkdev_direct_IO(int rw, struct kiocb *i
 			loff_t offset, unsigned long nr_segs)
 {
 	struct file *file = iocb->ki_filp;
-	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode *inode = file->f_mapping->host;
 
 	return blockdev_direct_IO(rw, iocb, inode, inode->i_bdev, iov, offset,
 				nr_segs, blkdev_get_blocks, NULL);
diff -puN fs/ext2/inode.c~RD9-f_mapping2-B6 fs/ext2/inode.c
--- 25/fs/ext2/inode.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/ext2/inode.c	2003-10-03 22:12:32.000000000 -0700
@@ -659,7 +659,7 @@ ext2_direct_IO(int rw, struct kiocb *ioc
 			loff_t offset, unsigned long nr_segs)
 {
 	struct file *file = iocb->ki_filp;
-	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode *inode = file->f_mapping->host;
 
 	return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
 				offset, nr_segs, ext2_get_blocks, NULL);
diff -puN fs/ext3/inode.c~RD9-f_mapping2-B6 fs/ext3/inode.c
--- 25/fs/ext3/inode.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/ext3/inode.c	2003-10-03 22:12:32.000000000 -0700
@@ -1537,7 +1537,7 @@ static int ext3_direct_IO(int rw, struct
 			unsigned long nr_segs)
 {
 	struct file *file = iocb->ki_filp;
-	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode *inode = file->f_mapping->host;
 	struct ext3_inode_info *ei = EXT3_I(inode);
 	handle_t *handle = NULL;
 	int ret;
diff -puN fs/jfs/inode.c~RD9-f_mapping2-B6 fs/jfs/inode.c
--- 25/fs/jfs/inode.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/jfs/inode.c	2003-10-03 22:12:32.000000000 -0700
@@ -302,7 +302,7 @@ static int jfs_direct_IO(int rw, struct 
 			loff_t offset, unsigned long nr_segs)
 {
 	struct file *file = iocb->ki_filp;
-	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode *inode = file->f_mapping->host;
 
 	return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
 				offset, nr_segs, jfs_get_blocks, NULL);
diff -puN fs/read_write.c~RD9-f_mapping2-B6 fs/read_write.c
--- 25/fs/read_write.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/read_write.c	2003-10-03 22:12:32.000000000 -0700
@@ -26,7 +26,7 @@ struct file_operations generic_ro_fops =
 loff_t generic_file_llseek(struct file *file, loff_t offset, int origin)
 {
 	long long retval;
-	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode *inode = file->f_mapping->host;
 
 	down(&inode->i_sem);
 	switch (origin) {
diff -puN fs/reiserfs/inode.c~RD9-f_mapping2-B6 fs/reiserfs/inode.c
--- 25/fs/reiserfs/inode.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/reiserfs/inode.c	2003-10-03 22:12:32.000000000 -0700
@@ -2375,7 +2375,7 @@ static int reiserfs_direct_IO(int rw, st
 			      loff_t offset, unsigned long nr_segs)
 {
     struct file *file = iocb->ki_filp;
-    struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+    struct inode *inode = file->f_mapping->host;
 
     return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
 			      offset, nr_segs, reiserfs_get_blocks_direct_io, NULL);
diff -puN fs/xfs/linux/xfs_aops.c~RD9-f_mapping2-B6 fs/xfs/linux/xfs_aops.c
--- 25/fs/xfs/linux/xfs_aops.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/xfs/linux/xfs_aops.c	2003-10-03 22:12:32.000000000 -0700
@@ -974,7 +974,7 @@ linvfs_direct_IO(
 	unsigned long		nr_segs)
 {
 	struct file	*file = iocb->ki_filp;
-	struct inode	*inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	page_buf_bmap_t	pbmap;
 	int		maps = 1;
diff -puN fs/xfs/linux/xfs_file.c~RD9-f_mapping2-B6 fs/xfs/linux/xfs_file.c
--- 25/fs/xfs/linux/xfs_file.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/fs/xfs/linux/xfs_file.c	2003-10-03 22:12:32.000000000 -0700
@@ -86,7 +86,7 @@ linvfs_write(
 {
 	struct iovec	iov = {(void *)buf, count};
 	struct file	*file = iocb->ki_filp;
-	struct inode	*inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	int		error;
 	int		direct = file->f_flags & O_DIRECT;
@@ -111,7 +111,7 @@ linvfs_readv(
 	unsigned long		nr_segs,
 	loff_t			*ppos)
 {
-	struct inode	*inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	struct		kiocb kiocb;
 	int		error;
@@ -133,7 +133,7 @@ linvfs_writev(
 	unsigned long		nr_segs,
 	loff_t			*ppos)
 {
-	struct inode	*inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode	*inode = file->f_mapping->host;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	struct		kiocb kiocb;
 	int		error;
diff -puN include/linux/fs.h~RD9-f_mapping2-B6 include/linux/fs.h
--- 25/include/linux/fs.h~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/include/linux/fs.h	2003-10-03 22:12:32.000000000 -0700
@@ -1331,7 +1331,7 @@ static inline void do_generic_file_read(
 					read_descriptor_t * desc,
 					read_actor_t actor)
 {
-	do_generic_mapping_read(filp->f_dentry->d_inode->i_mapping,
+	do_generic_mapping_read(filp->f_mapping,
 				&filp->f_ra,
 				filp,
 				ppos,
diff -puN mm/filemap.c~RD9-f_mapping2-B6 mm/filemap.c
--- 25/mm/filemap.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/mm/filemap.c	2003-10-03 22:12:32.000000000 -0700
@@ -797,7 +797,7 @@ __generic_file_aio_read(struct kiocb *io
 		struct address_space *mapping;
 		struct inode *inode;
 
-		mapping = filp->f_dentry->d_inode->i_mapping;
+		mapping = filp->f_mapping;
 		inode = mapping->host;
 		retval = 0;
 		if (!count)
@@ -929,7 +929,7 @@ asmlinkage ssize_t sys_readahead(int fd,
 	file = fget(fd);
 	if (file) {
 		if (file->f_mode & FMODE_READ) {
-			struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+			struct address_space *mapping = file->f_mapping;
 			unsigned long start = offset >> PAGE_CACHE_SHIFT;
 			unsigned long end = (offset + count - 1) >> PAGE_CACHE_SHIFT;
 			unsigned long len = end - start + 1;
@@ -948,7 +948,7 @@ asmlinkage ssize_t sys_readahead(int fd,
 static int FASTCALL(page_cache_read(struct file * file, unsigned long offset));
 static int page_cache_read(struct file * file, unsigned long offset)
 {
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	struct page *page; 
 	int error;
 
@@ -987,7 +987,7 @@ struct page * filemap_nopage(struct vm_a
 {
 	int error;
 	struct file *file = area->vm_file;
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	struct file_ra_state *ra = &file->f_ra;
 	struct inode *inode = mapping->host;
 	struct page *page;
@@ -1159,7 +1159,7 @@ EXPORT_SYMBOL(filemap_nopage);
 static struct page * filemap_getpage(struct file *file, unsigned long pgoff,
 					int nonblock)
 {
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	struct page *page;
 	int error;
 
@@ -1271,7 +1271,7 @@ static int filemap_populate(struct vm_ar
 			int nonblock)
 {
 	struct file *file = vma->vm_file;
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = mapping->host;
 	unsigned long size;
 	struct mm_struct *mm = vma->vm_mm;
@@ -1330,7 +1330,7 @@ static struct vm_operations_struct gener
 
 int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
 {
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	struct inode *inode = mapping->host;
 
 	if (!mapping->a_ops->readpage)
@@ -1692,7 +1692,7 @@ generic_file_aio_write_nolock(struct kio
 				unsigned long nr_segs, loff_t *ppos)
 {
 	struct file *file = iocb->ki_filp;
-	struct address_space * mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space * mapping = file->f_mapping;
 	struct address_space_operations *a_ops = mapping->a_ops;
 	size_t ocount;		/* original count */
 	size_t count;		/* after file limit checks */
@@ -1892,7 +1892,7 @@ ssize_t generic_file_aio_write(struct ki
 			       size_t count, loff_t pos)
 {
 	struct file *file = iocb->ki_filp;
-	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode *inode = file->f_mapping->host;
 	ssize_t err;
 	struct iovec local_iov = { .iov_base = (void __user *)buf, .iov_len = count };
 
@@ -1911,7 +1911,7 @@ EXPORT_SYMBOL(generic_file_aio_write);
 ssize_t generic_file_write(struct file *file, const char __user *buf,
 			   size_t count, loff_t *ppos)
 {
-	struct inode	*inode = file->f_dentry->d_inode->i_mapping->host;
+	struct inode	*inode = file->f_mapping->host;
 	ssize_t		err;
 	struct iovec local_iov = { .iov_base = (void __user *)buf, .iov_len = count };
 
@@ -1958,7 +1958,7 @@ generic_file_direct_IO(int rw, struct ki
 	loff_t offset, unsigned long nr_segs)
 {
 	struct file *file = iocb->ki_filp;
-	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
+	struct address_space *mapping = file->f_mapping;
 	ssize_t retval;
 
 	if (mapping->nrpages) {
diff -puN mm/madvise.c~RD9-f_mapping2-B6 mm/madvise.c
--- 25/mm/madvise.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/mm/madvise.c	2003-10-03 22:12:32.000000000 -0700
@@ -65,7 +65,7 @@ static long madvise_willneed(struct vm_a
 		end = vma->vm_end;
 	end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
 
-	force_page_cache_readahead(file->f_dentry->d_inode->i_mapping,
+	force_page_cache_readahead(file->f_mapping,
 			file, start, max_sane_readahead(end - start));
 	return 0;
 }
diff -puN mm/memory.c~RD9-f_mapping2-B6 mm/memory.c
--- 25/mm/memory.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/mm/memory.c	2003-10-03 22:12:32.000000000 -0700
@@ -1398,7 +1398,7 @@ do_no_page(struct mm_struct *mm, struct 
 	spin_unlock(&mm->page_table_lock);
 
 	if (vma->vm_file) {
-		mapping = vma->vm_file->f_dentry->d_inode->i_mapping;
+		mapping = vma->vm_file->f_mapping;
 		sequence = atomic_read(&mapping->truncate_count);
 	}
 	smp_rmb();  /* Prevent CPU from reordering lock-free ->nopage() */
diff -puN mm/mincore.c~RD9-f_mapping2-B6 mm/mincore.c
--- 25/mm/mincore.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/mm/mincore.c	2003-10-03 22:12:32.000000000 -0700
@@ -26,7 +26,7 @@ static unsigned char mincore_page(struct
 	unsigned long pgoff)
 {
 	unsigned char present = 0;
-	struct address_space * as = vma->vm_file->f_dentry->d_inode->i_mapping;
+	struct address_space * as = vma->vm_file->f_mapping;
 	struct page * page;
 
 	page = find_get_page(as, pgoff);
diff -puN mm/mmap.c~RD9-f_mapping2-B6 mm/mmap.c
--- 25/mm/mmap.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/mm/mmap.c	2003-10-03 22:12:32.000000000 -0700
@@ -264,7 +264,7 @@ static void vma_link(struct mm_struct *m
 	struct address_space *mapping = NULL;
 
 	if (vma->vm_file)
-		mapping = vma->vm_file->f_dentry->d_inode->i_mapping;
+		mapping = vma->vm_file->f_mapping;
 
 	if (mapping)
 		down(&mapping->i_shared_sem);
diff -puN mm/swapfile.c~RD9-f_mapping2-B6 mm/swapfile.c
--- 25/mm/swapfile.c~RD9-f_mapping2-B6	2003-10-03 22:12:32.000000000 -0700
+++ 25-akpm/mm/swapfile.c	2003-10-03 22:12:32.000000000 -0700
@@ -1031,13 +1031,13 @@ asmlinkage long sys_swapoff(const char _
 	if (IS_ERR(victim))
 		goto out;
 
-	mapping = victim->f_dentry->d_inode->i_mapping;
+	mapping = victim->f_mapping;
 	prev = -1;
 	swap_list_lock();
 	for (type = swap_list.head; type >= 0; type = swap_info[type].next) {
 		p = swap_info + type;
 		if ((p->flags & SWP_ACTIVE) == SWP_ACTIVE) {
-			if (p->swap_file->f_dentry->d_inode->i_mapping==mapping)
+			if (p->swap_file->f_mapping == mapping)
 				break;
 		}
 		prev = type;
@@ -1105,7 +1105,7 @@ asmlinkage long sys_swapoff(const char _
 		set_blocksize(bdev, p->old_block_size);
 		bd_release(bdev);
 	} else {
-		up(&swap_file->f_dentry->d_inode->i_mapping->host->i_sem);
+		up(&swap_file->f_mapping->host->i_sem);
 	}
 	filp_close(swap_file, NULL);
 	err = 0;
@@ -1280,7 +1280,7 @@ asmlinkage long sys_swapon(const char __
 
 	p->swap_file = swap_file;
 	inode = swap_file->f_dentry->d_inode;
-	mapping = swap_file->f_dentry->d_inode->i_mapping;
+	mapping = swap_file->f_mapping;
 
 	error = -EBUSY;
 	for (i = 0; i < nr_swapfiles; i++) {
@@ -1288,7 +1288,7 @@ asmlinkage long sys_swapon(const char __
 
 		if (i == type || !q->swap_file)
 			continue;
-		if (mapping == q->swap_file->f_dentry->d_inode->i_mapping)
+		if (mapping == q->swap_file->f_mapping)
 			goto bad_swap;
 	}
 

_