aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-10-17 03:47:38 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 03:07:23 -0500
commit5561093e2cac9f7d2a77e39cc689b8d2b7f9b2bc (patch)
treeaac1fa3e47604f2d7bb1e4d9e97f41b8ffebe91e /fs/gfs2/inode.c
parentbf36a713169432643d4fc7eeb4e0ace96d791d26 (diff)
[GFS2] Introduce gfs2_set_aops()
Just like ext3 we now have three sets of address space operations to cover the cases of writeback, ordered and journalled data writes. This means that the individual operations can now become less complicated as we are able to remove some of the tests for file data mode from the code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index af493fc6c8ce..532784eb5ba4 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -136,7 +136,6 @@ void gfs2_set_iop(struct inode *inode)
136 if (S_ISREG(mode)) { 136 if (S_ISREG(mode)) {
137 inode->i_op = &gfs2_file_iops; 137 inode->i_op = &gfs2_file_iops;
138 inode->i_fop = &gfs2_file_fops; 138 inode->i_fop = &gfs2_file_fops;
139 inode->i_mapping->a_ops = &gfs2_file_aops;
140 } else if (S_ISDIR(mode)) { 139 } else if (S_ISDIR(mode)) {
141 inode->i_op = &gfs2_dir_iops; 140 inode->i_op = &gfs2_dir_iops;
142 inode->i_fop = &gfs2_dir_fops; 141 inode->i_fop = &gfs2_dir_fops;
@@ -290,6 +289,9 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
290 di->di_entries = be32_to_cpu(str->di_entries); 289 di->di_entries = be32_to_cpu(str->di_entries);
291 290
292 di->di_eattr = be64_to_cpu(str->di_eattr); 291 di->di_eattr = be64_to_cpu(str->di_eattr);
292 if (S_ISREG(ip->i_inode.i_mode))
293 gfs2_set_aops(&ip->i_inode);
294
293 return 0; 295 return 0;
294} 296}
295 297