diff options
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 3176b3d3ffa8..c5513953c825 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "ext2.h" | 34 | #include "ext2.h" |
35 | #include "xattr.h" | 35 | #include "xattr.h" |
36 | #include "acl.h" | 36 | #include "acl.h" |
37 | #include "xip.h" | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * Couple of helper functions - make the code slightly cleaner. | 40 | * 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 | |||
127 | int err = PTR_ERR(inode); | 128 | int err = PTR_ERR(inode); |
128 | if (!IS_ERR(inode)) { | 129 | if (!IS_ERR(inode)) { |
129 | inode->i_op = &ext2_file_inode_operations; | 130 | inode->i_op = &ext2_file_inode_operations; |
130 | inode->i_fop = &ext2_file_operations; | 131 | if (ext2_use_xip(inode->i_sb)) { |
131 | if (test_opt(inode->i_sb, NOBH)) | 132 | inode->i_mapping->a_ops = &ext2_aops_xip; |
133 | inode->i_fop = &ext2_xip_file_operations; | ||
134 | } else if (test_opt(inode->i_sb, NOBH)) { | ||
132 | inode->i_mapping->a_ops = &ext2_nobh_aops; | 135 | inode->i_mapping->a_ops = &ext2_nobh_aops; |
133 | else | 136 | inode->i_fop = &ext2_file_operations; |
137 | } else { | ||
134 | inode->i_mapping->a_ops = &ext2_aops; | 138 | inode->i_mapping->a_ops = &ext2_aops; |
139 | inode->i_fop = &ext2_file_operations; | ||
140 | } | ||
135 | mark_inode_dirty(inode); | 141 | mark_inode_dirty(inode); |
136 | err = ext2_add_nondir(dentry, inode); | 142 | err = ext2_add_nondir(dentry, inode); |
137 | } | 143 | } |