diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
commit | bd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch) | |
tree | 3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /fs/gfs2 | |
parent | 6c33cafc794d07c9254c160789120a0e98c088c9 (diff) | |
parent | 0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/inode.c | 3 | ||||
-rw-r--r-- | fs/gfs2/main.c | 4 | ||||
-rw-r--r-- | fs/gfs2/ops_address.c | 7 | ||||
-rw-r--r-- | fs/gfs2/ops_super.c | 44 |
4 files changed, 33 insertions, 25 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 57c43ac47925..d470e5286ecd 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -157,6 +157,9 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum *inum, | |||
157 | struct gfs2_glock *io_gl; | 157 | struct gfs2_glock *io_gl; |
158 | int error; | 158 | int error; |
159 | 159 | ||
160 | if (!inode) | ||
161 | return ERR_PTR(-ENOBUFS); | ||
162 | |||
160 | if (inode->i_state & I_NEW) { | 163 | if (inode->i_state & I_NEW) { |
161 | struct gfs2_sbd *sdp = GFS2_SB(inode); | 164 | struct gfs2_sbd *sdp = GFS2_SB(inode); |
162 | umode_t mode = DT2IF(type); | 165 | umode_t mode = DT2IF(type); |
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 21508a13bb78..9889c1eacec1 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c | |||
@@ -84,8 +84,8 @@ static int __init init_gfs2_fs(void) | |||
84 | 84 | ||
85 | gfs2_inode_cachep = kmem_cache_create("gfs2_inode", | 85 | gfs2_inode_cachep = kmem_cache_create("gfs2_inode", |
86 | sizeof(struct gfs2_inode), | 86 | sizeof(struct gfs2_inode), |
87 | 0, (SLAB_RECLAIM_ACCOUNT| | 87 | 0, SLAB_RECLAIM_ACCOUNT| |
88 | SLAB_PANIC|SLAB_MEM_SPREAD), | 88 | SLAB_MEM_SPREAD, |
89 | gfs2_init_inode_once, NULL); | 89 | gfs2_init_inode_once, NULL); |
90 | if (!gfs2_inode_cachep) | 90 | if (!gfs2_inode_cachep) |
91 | goto fail; | 91 | goto fail; |
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 8d5963c7e123..015640b3f123 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c | |||
@@ -337,13 +337,6 @@ out: | |||
337 | out_noerror: | 337 | out_noerror: |
338 | ret = 0; | 338 | ret = 0; |
339 | out_unlock: | 339 | out_unlock: |
340 | /* unlock all pages, we can't do any I/O right now */ | ||
341 | for (page_idx = 0; page_idx < nr_pages; page_idx++) { | ||
342 | struct page *page = list_entry(pages->prev, struct page, lru); | ||
343 | list_del(&page->lru); | ||
344 | unlock_page(page); | ||
345 | page_cache_release(page); | ||
346 | } | ||
347 | if (do_unlock) | 340 | if (do_unlock) |
348 | gfs2_holder_uninit(&gh); | 341 | gfs2_holder_uninit(&gh); |
349 | goto out; | 342 | goto out; |
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 06f06f7773d0..b47d9598c047 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c | |||
@@ -138,16 +138,27 @@ static void gfs2_put_super(struct super_block *sb) | |||
138 | } | 138 | } |
139 | 139 | ||
140 | /** | 140 | /** |
141 | * gfs2_write_super - disk commit all incore transactions | 141 | * gfs2_write_super |
142 | * @sb: the filesystem | 142 | * @sb: the superblock |
143 | * | 143 | * |
144 | * This function is called every time sync(2) is called. | ||
145 | * After this exits, all dirty buffers are synced. | ||
146 | */ | 144 | */ |
147 | 145 | ||
148 | static void gfs2_write_super(struct super_block *sb) | 146 | static void gfs2_write_super(struct super_block *sb) |
149 | { | 147 | { |
148 | sb->s_dirt = 0; | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * gfs2_sync_fs - sync the filesystem | ||
153 | * @sb: the superblock | ||
154 | * | ||
155 | * Flushes the log to disk. | ||
156 | */ | ||
157 | static int gfs2_sync_fs(struct super_block *sb, int wait) | ||
158 | { | ||
159 | sb->s_dirt = 0; | ||
150 | gfs2_log_flush(sb->s_fs_info, NULL); | 160 | gfs2_log_flush(sb->s_fs_info, NULL); |
161 | return 0; | ||
151 | } | 162 | } |
152 | 163 | ||
153 | /** | 164 | /** |
@@ -452,17 +463,18 @@ static void gfs2_destroy_inode(struct inode *inode) | |||
452 | } | 463 | } |
453 | 464 | ||
454 | struct super_operations gfs2_super_ops = { | 465 | struct super_operations gfs2_super_ops = { |
455 | .alloc_inode = gfs2_alloc_inode, | 466 | .alloc_inode = gfs2_alloc_inode, |
456 | .destroy_inode = gfs2_destroy_inode, | 467 | .destroy_inode = gfs2_destroy_inode, |
457 | .write_inode = gfs2_write_inode, | 468 | .write_inode = gfs2_write_inode, |
458 | .delete_inode = gfs2_delete_inode, | 469 | .delete_inode = gfs2_delete_inode, |
459 | .put_super = gfs2_put_super, | 470 | .put_super = gfs2_put_super, |
460 | .write_super = gfs2_write_super, | 471 | .write_super = gfs2_write_super, |
461 | .write_super_lockfs = gfs2_write_super_lockfs, | 472 | .sync_fs = gfs2_sync_fs, |
462 | .unlockfs = gfs2_unlockfs, | 473 | .write_super_lockfs = gfs2_write_super_lockfs, |
463 | .statfs = gfs2_statfs, | 474 | .unlockfs = gfs2_unlockfs, |
464 | .remount_fs = gfs2_remount_fs, | 475 | .statfs = gfs2_statfs, |
465 | .clear_inode = gfs2_clear_inode, | 476 | .remount_fs = gfs2_remount_fs, |
466 | .show_options = gfs2_show_options, | 477 | .clear_inode = gfs2_clear_inode, |
478 | .show_options = gfs2_show_options, | ||
467 | }; | 479 | }; |
468 | 480 | ||