diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2014-03-31 20:48:27 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-03-31 20:48:27 +0400 |
commit | 1b2ad41214c9bf6e8befa000f0522629194bf540 (patch) | |
tree | ca9bfdbbabf9aa50e81565c643a8849789a69949 /fs/gfs2/meta_io.h | |
parent | 059788039f1e6343f34f46d202f8d9f2158c2783 (diff) | |
download | linux-1b2ad41214c9bf6e8befa000f0522629194bf540.tar.xz |
GFS2: Fix address space from page function
Now that rgrps use the address space which is part of the super
block, we need to update gfs2_mapping2sbd() to take account of
that. The only way to do that easily is to use a different set
of address_space_operations for rgrps.
Reported-by: Abhi Das <adas@redhat.com>
Tested-by: Abhi Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/meta_io.h')
-rw-r--r-- | fs/gfs2/meta_io.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index 4823b934208a..ac5d8027d335 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h @@ -38,12 +38,15 @@ static inline void gfs2_buffer_copy_tail(struct buffer_head *to_bh, } extern const struct address_space_operations gfs2_meta_aops; +extern const struct address_space_operations gfs2_rgrp_aops; static inline struct gfs2_sbd *gfs2_mapping2sbd(struct address_space *mapping) { struct inode *inode = mapping->host; if (mapping->a_ops == &gfs2_meta_aops) return (((struct gfs2_glock *)mapping) - 1)->gl_sbd; + else if (mapping->a_ops == &gfs2_rgrp_aops) + return container_of(mapping, struct gfs2_sbd, sd_aspace); else return inode->i_sb->s_fs_info; } |