diff options
Diffstat (limited to 'fs/nilfs2/page.c')
-rw-r--r-- | fs/nilfs2/page.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index b3b988c2018f..3f18f5c076e8 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -182,7 +182,7 @@ int nilfs_page_buffers_clean(struct page *page) | |||
182 | void nilfs_page_bug(struct page *page) | 182 | void nilfs_page_bug(struct page *page) |
183 | { | 183 | { |
184 | struct address_space *m; | 184 | struct address_space *m; |
185 | unsigned long ino = 0; | 185 | unsigned long ino; |
186 | 186 | ||
187 | if (unlikely(!page)) { | 187 | if (unlikely(!page)) { |
188 | printk(KERN_CRIT "NILFS_PAGE_BUG(NULL)\n"); | 188 | printk(KERN_CRIT "NILFS_PAGE_BUG(NULL)\n"); |
@@ -190,11 +190,8 @@ void nilfs_page_bug(struct page *page) | |||
190 | } | 190 | } |
191 | 191 | ||
192 | m = page->mapping; | 192 | m = page->mapping; |
193 | if (m) { | 193 | ino = m ? m->host->i_ino : 0; |
194 | struct inode *inode = NILFS_AS_I(m); | 194 | |
195 | if (inode != NULL) | ||
196 | ino = inode->i_ino; | ||
197 | } | ||
198 | printk(KERN_CRIT "NILFS_PAGE_BUG(%p): cnt=%d index#=%llu flags=0x%lx " | 195 | printk(KERN_CRIT "NILFS_PAGE_BUG(%p): cnt=%d index#=%llu flags=0x%lx " |
199 | "mapping=%p ino=%lu\n", | 196 | "mapping=%p ino=%lu\n", |
200 | page, atomic_read(&page->_count), | 197 | page, atomic_read(&page->_count), |
@@ -441,10 +438,10 @@ unsigned nilfs_page_count_clean_buffers(struct page *page, | |||
441 | return nc; | 438 | return nc; |
442 | } | 439 | } |
443 | 440 | ||
444 | void nilfs_mapping_init(struct address_space *mapping, | 441 | void nilfs_mapping_init(struct address_space *mapping, struct inode *inode, |
445 | struct backing_dev_info *bdi) | 442 | struct backing_dev_info *bdi) |
446 | { | 443 | { |
447 | mapping->host = NULL; | 444 | mapping->host = inode; |
448 | mapping->flags = 0; | 445 | mapping->flags = 0; |
449 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 446 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
450 | mapping->assoc_mapping = NULL; | 447 | mapping->assoc_mapping = NULL; |