[PATCH] remove aops from directory inodes (4 of 1)

[email protected] (Dave Kleikamp) Thu, 24 Mar 2005 08:13:22 -0600 (CST)
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/03/24 08:06:44-06:00 [email protected] 
#   JFS: remove aops from directory inodes
#   
#   jfs no longer uses a directory inode's address space.  Clean up the
#   code by removing aops for directories altogether
#   
#   Signed-off-by: Dave Kleikamp <[email protected]>
# 
diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c
--- a/fs/jfs/inode.c	2005-03-24 08:10:55 -06:00
+++ b/fs/jfs/inode.c	2005-03-24 08:10:55 -06:00
@@ -52,8 +52,6 @@
 	} else if (S_ISDIR(inode->i_mode)) {
 		inode->i_op = &jfs_dir_inode_operations;
 		inode->i_fop = &jfs_dir_operations;
-		inode->i_mapping->a_ops = &jfs_aops;
-		mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
 	} else if (S_ISLNK(inode->i_mode)) {
 		if (inode->i_size >= IDATASIZE) {
 			inode->i_op = &page_symlink_inode_operations;
@@ -184,11 +182,11 @@
 	s32 xlen;
 
 	/*
-	 * If this is a special inode (imap, dmap) or directory,
+	 * If this is a special inode (imap, dmap)
 	 * the lock should already be taken
 	 */
-	take_locks = ((JFS_IP(ip)->fileset != AGGREGATE_I) &&
-		      !S_ISDIR(ip->i_mode));
+	take_locks = (JFS_IP(ip)->fileset != AGGREGATE_I);
+
 	/*
 	 * Take appropriate lock on inode
 	 */
@@ -198,12 +196,6 @@
 		else
 			IREAD_LOCK(ip);
 	}
-
-	/*
-	 * Don't try to do xtLookup when there is no xtree
-	 */
-	if (S_ISDIR(ip->i_mode) && jfs_dirtable_inline(ip))
-		goto unlock;
 
 	if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) &&
 	    (xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, 0)
diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c
--- a/fs/jfs/namei.c	2005-03-24 08:10:55 -06:00
+++ b/fs/jfs/namei.c	2005-03-24 08:10:55 -06:00
@@ -262,8 +262,6 @@
 	ip->i_nlink = 2;	/* for '.' */
 	ip->i_op = &jfs_dir_inode_operations;
 	ip->i_fop = &jfs_dir_operations;
-	ip->i_mapping->a_ops = &jfs_aops;
-	mapping_set_gfp_mask(ip->i_mapping, GFP_NOFS);
 
 	insert_inode_hash(ip);
 	mark_inode_dirty(ip);


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click