aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-17 16:53:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-17 16:53:35 -0400
commit7d32c0aca4fbd0319c860d12af5fae3e88c760e6 (patch)
tree3df9712c128a98916601a98510e5160dac809264 /fs/logfs/super.c
parent3d2c978e0cd8b1157f9eebd13062d61fb7a75ad5 (diff)
parent6f485b41875dbf5160c1990322469c1f65f77b28 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs
* git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs: logfs: handle powerfail on NAND flash logfs: handle errors from get_mtd_device() logfs: remove unused variable logfs: fix sync logfs: fix compile failure logfs: initialize li->li_refcount logfs: commit reservations under space pressure logfs: survive logfs_buf_recover read errors logfs: Close i_ino reuse race logfs: fix logfs_seek_hole() logfs: Return -EINVAL if filesystem image doesn't match LogFS: Fix typo in b6349ac8 logfs: testing the wrong variable
Diffstat (limited to 'fs/logfs/super.c')
-rw-r--r--fs/logfs/super.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/logfs/super.c b/fs/logfs/super.c
index d7c23ed8349a..d651e10a1e9c 100644
--- a/fs/logfs/super.c
+++ b/fs/logfs/super.c
@@ -138,10 +138,14 @@ static int logfs_sb_set(struct super_block *sb, void *_super)
138 sb->s_fs_info = super; 138 sb->s_fs_info = super;
139 sb->s_mtd = super->s_mtd; 139 sb->s_mtd = super->s_mtd;
140 sb->s_bdev = super->s_bdev; 140 sb->s_bdev = super->s_bdev;
141#ifdef CONFIG_BLOCK
141 if (sb->s_bdev) 142 if (sb->s_bdev)
142 sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info; 143 sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info;
144#endif
145#ifdef CONFIG_MTD
143 if (sb->s_mtd) 146 if (sb->s_mtd)
144 sb->s_bdi = sb->s_mtd->backing_dev_info; 147 sb->s_bdi = sb->s_mtd->backing_dev_info;
148#endif
145 return 0; 149 return 0;
146} 150}
147 151
@@ -382,7 +386,7 @@ static struct page *find_super_block(struct super_block *sb)
382 if (!first || IS_ERR(first)) 386 if (!first || IS_ERR(first))
383 return NULL; 387 return NULL;
384 last = super->s_devops->find_last_sb(sb, &super->s_sb_ofs[1]); 388 last = super->s_devops->find_last_sb(sb, &super->s_sb_ofs[1]);
385 if (!last || IS_ERR(first)) { 389 if (!last || IS_ERR(last)) {
386 page_cache_release(first); 390 page_cache_release(first);
387 return NULL; 391 return NULL;
388 } 392 }
@@ -413,7 +417,7 @@ static int __logfs_read_sb(struct super_block *sb)
413 417
414 page = find_super_block(sb); 418 page = find_super_block(sb);
415 if (!page) 419 if (!page)
416 return -EIO; 420 return -EINVAL;
417 421
418 ds = page_address(page); 422 ds = page_address(page);
419 super->s_size = be64_to_cpu(ds->ds_filesystem_size); 423 super->s_size = be64_to_cpu(ds->ds_filesystem_size);