diff options
author | Rafael Aquini <aquini@redhat.com> | 2012-12-11 19:02:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 20:22:26 -0500 |
commit | 252aa6f5be64c90c67b9f066ccff880f6b487d32 (patch) | |
tree | 9bb13ada4d838d232d761f45aa9e1a0b26a40cff /fs | |
parent | 78bd52097d04205a33a8014a1b8ac01cf1ae9d06 (diff) |
mm: redefine address_space.assoc_mapping
Overhaul struct address_space.assoc_mapping renaming it to
address_space.private_data and its type is redefined to void*. By this
approach we consistently name the .private_* elements from struct
address_space as well as allow extended usage for address_space
association with other data structures through ->private_data.
Also, all users of old ->assoc_mapping element are converted to reflect
its new name and type change (->private_data).
Signed-off-by: Rafael Aquini <aquini@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 12 | ||||
-rw-r--r-- | fs/gfs2/glock.c | 2 | ||||
-rw-r--r-- | fs/inode.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/page.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index ec0aca8ba6bf..6e9ed48064fc 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -555,7 +555,7 @@ void emergency_thaw_all(void) | |||
555 | */ | 555 | */ |
556 | int sync_mapping_buffers(struct address_space *mapping) | 556 | int sync_mapping_buffers(struct address_space *mapping) |
557 | { | 557 | { |
558 | struct address_space *buffer_mapping = mapping->assoc_mapping; | 558 | struct address_space *buffer_mapping = mapping->private_data; |
559 | 559 | ||
560 | if (buffer_mapping == NULL || list_empty(&mapping->private_list)) | 560 | if (buffer_mapping == NULL || list_empty(&mapping->private_list)) |
561 | return 0; | 561 | return 0; |
@@ -588,10 +588,10 @@ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) | |||
588 | struct address_space *buffer_mapping = bh->b_page->mapping; | 588 | struct address_space *buffer_mapping = bh->b_page->mapping; |
589 | 589 | ||
590 | mark_buffer_dirty(bh); | 590 | mark_buffer_dirty(bh); |
591 | if (!mapping->assoc_mapping) { | 591 | if (!mapping->private_data) { |
592 | mapping->assoc_mapping = buffer_mapping; | 592 | mapping->private_data = buffer_mapping; |
593 | } else { | 593 | } else { |
594 | BUG_ON(mapping->assoc_mapping != buffer_mapping); | 594 | BUG_ON(mapping->private_data != buffer_mapping); |
595 | } | 595 | } |
596 | if (!bh->b_assoc_map) { | 596 | if (!bh->b_assoc_map) { |
597 | spin_lock(&buffer_mapping->private_lock); | 597 | spin_lock(&buffer_mapping->private_lock); |
@@ -788,7 +788,7 @@ void invalidate_inode_buffers(struct inode *inode) | |||
788 | if (inode_has_buffers(inode)) { | 788 | if (inode_has_buffers(inode)) { |
789 | struct address_space *mapping = &inode->i_data; | 789 | struct address_space *mapping = &inode->i_data; |
790 | struct list_head *list = &mapping->private_list; | 790 | struct list_head *list = &mapping->private_list; |
791 | struct address_space *buffer_mapping = mapping->assoc_mapping; | 791 | struct address_space *buffer_mapping = mapping->private_data; |
792 | 792 | ||
793 | spin_lock(&buffer_mapping->private_lock); | 793 | spin_lock(&buffer_mapping->private_lock); |
794 | while (!list_empty(list)) | 794 | while (!list_empty(list)) |
@@ -811,7 +811,7 @@ int remove_inode_buffers(struct inode *inode) | |||
811 | if (inode_has_buffers(inode)) { | 811 | if (inode_has_buffers(inode)) { |
812 | struct address_space *mapping = &inode->i_data; | 812 | struct address_space *mapping = &inode->i_data; |
813 | struct list_head *list = &mapping->private_list; | 813 | struct list_head *list = &mapping->private_list; |
814 | struct address_space *buffer_mapping = mapping->assoc_mapping; | 814 | struct address_space *buffer_mapping = mapping->private_data; |
815 | 815 | ||
816 | spin_lock(&buffer_mapping->private_lock); | 816 | spin_lock(&buffer_mapping->private_lock); |
817 | while (!list_empty(list)) { | 817 | while (!list_empty(list)) { |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index e6c2fd53cab2..0f22d09f358d 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -768,7 +768,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
768 | mapping->host = s->s_bdev->bd_inode; | 768 | mapping->host = s->s_bdev->bd_inode; |
769 | mapping->flags = 0; | 769 | mapping->flags = 0; |
770 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 770 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
771 | mapping->assoc_mapping = NULL; | 771 | mapping->private_data = NULL; |
772 | mapping->backing_dev_info = s->s_bdi; | 772 | mapping->backing_dev_info = s->s_bdi; |
773 | mapping->writeback_index = 0; | 773 | mapping->writeback_index = 0; |
774 | } | 774 | } |
diff --git a/fs/inode.c b/fs/inode.c index 64999f144153..14084b72b259 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -165,7 +165,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) | |||
165 | mapping->host = inode; | 165 | mapping->host = inode; |
166 | mapping->flags = 0; | 166 | mapping->flags = 0; |
167 | mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE); | 167 | mapping_set_gfp_mask(mapping, GFP_HIGHUSER_MOVABLE); |
168 | mapping->assoc_mapping = NULL; | 168 | mapping->private_data = NULL; |
169 | mapping->backing_dev_info = &default_backing_dev_info; | 169 | mapping->backing_dev_info = &default_backing_dev_info; |
170 | mapping->writeback_index = 0; | 170 | mapping->writeback_index = 0; |
171 | 171 | ||
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 3e7b2a0dc0c8..07f76db04ec7 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -431,7 +431,7 @@ void nilfs_mapping_init(struct address_space *mapping, struct inode *inode, | |||
431 | mapping->host = inode; | 431 | mapping->host = inode; |
432 | mapping->flags = 0; | 432 | mapping->flags = 0; |
433 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 433 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
434 | mapping->assoc_mapping = NULL; | 434 | mapping->private_data = NULL; |
435 | mapping->backing_dev_info = bdi; | 435 | mapping->backing_dev_info = bdi; |
436 | mapping->a_ops = &empty_aops; | 436 | mapping->a_ops = &empty_aops; |
437 | } | 437 | } |