diff options
author | Carsten Otte <cotte@de.ibm.com> | 2005-06-23 22:05:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 00:06:41 -0700 |
commit | 6d79125bba55ee82701f1c7d4ebbc1aa20ecbe4e (patch) | |
tree | fbd7f82fea19fd89e09312fe89919774b94a6efe /fs/ext2/namei.c | |
parent | ceffc078528befc008c6f2c2c4decda79eabd534 (diff) | |
download | op-kernel-dev-6d79125bba55ee82701f1c7d4ebbc1aa20ecbe4e.zip op-kernel-dev-6d79125bba55ee82701f1c7d4ebbc1aa20ecbe4e.tar.gz |
[PATCH] xip: ext2: execute in place
These are the ext2 related parts. Ext2 now uses the xip_* file operations
along with the get_xip_page aop when mounted with -o xip.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext2/namei.c')
-rw-r--r-- | fs/ext2/namei.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 3176b3d..c551395 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -34,6 +34,7 @@ #include "ext2.h" #include "xattr.h" #include "acl.h" +#include "xip.h" /* * Couple of helper functions - make the code slightly cleaner. @@ -127,11 +128,16 @@ static int ext2_create (struct inode * dir, struct dentry * dentry, int mode, st int err = PTR_ERR(inode); if (!IS_ERR(inode)) { inode->i_op = &ext2_file_inode_operations; - inode->i_fop = &ext2_file_operations; - if (test_opt(inode->i_sb, NOBH)) + if (ext2_use_xip(inode->i_sb)) { + inode->i_mapping->a_ops = &ext2_aops_xip; + inode->i_fop = &ext2_xip_file_operations; + } else if (test_opt(inode->i_sb, NOBH)) { inode->i_mapping->a_ops = &ext2_nobh_aops; - else + inode->i_fop = &ext2_file_operations; + } else { inode->i_mapping->a_ops = &ext2_aops; + inode->i_fop = &ext2_file_operations; + } mark_inode_dirty(inode); err = ext2_add_nondir(dentry, inode); } |