Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
[DLM] fix oops in kref_put when removing a lockspace
[DLM] Fix kref_put oops
[GFS2] Fix OOM error handling
[GFS2] Fix incorrect fs sync behaviour.
[GFS2] don't panic needlessly

+46 -19
+13 -1
fs/dlm/lockspace.c
··· 43 43 ssize_t ret = len; 44 44 int n = simple_strtol(buf, NULL, 0); 45 45 46 + ls = dlm_find_lockspace_local(ls->ls_local_handle); 47 + if (!ls) 48 + return -EINVAL; 49 + 46 50 switch (n) { 47 51 case 0: 48 52 dlm_ls_stop(ls); ··· 57 53 default: 58 54 ret = -EINVAL; 59 55 } 56 + dlm_put_lockspace(ls); 60 57 return ret; 61 58 } 62 59 ··· 148 143 return a->store ? a->store(ls, buf, len) : len; 149 144 } 150 145 146 + static void lockspace_kobj_release(struct kobject *k) 147 + { 148 + struct dlm_ls *ls = container_of(k, struct dlm_ls, ls_kobj); 149 + kfree(ls); 150 + } 151 + 151 152 static struct sysfs_ops dlm_attr_ops = { 152 153 .show = dlm_attr_show, 153 154 .store = dlm_attr_store, ··· 162 151 static struct kobj_type dlm_ktype = { 163 152 .default_attrs = dlm_attrs, 164 153 .sysfs_ops = &dlm_attr_ops, 154 + .release = lockspace_kobj_release, 165 155 }; 166 156 167 157 static struct kset dlm_kset = { ··· 690 678 dlm_clear_members_gone(ls); 691 679 kfree(ls->ls_node_array); 692 680 kobject_unregister(&ls->ls_kobj); 693 - kfree(ls); 681 + /* The ls structure will be freed when the kobject is done with */ 694 682 695 683 mutex_lock(&ls_lock); 696 684 ls_count--;
+3
fs/gfs2/inode.c
··· 157 157 struct gfs2_glock *io_gl; 158 158 int error; 159 159 160 + if (!inode) 161 + return ERR_PTR(-ENOBUFS); 162 + 160 163 if (inode->i_state & I_NEW) { 161 164 struct gfs2_sbd *sdp = GFS2_SB(inode); 162 165 umode_t mode = DT2IF(type);
+2 -2
fs/gfs2/main.c
··· 84 84 85 85 gfs2_inode_cachep = kmem_cache_create("gfs2_inode", 86 86 sizeof(struct gfs2_inode), 87 - 0, (SLAB_RECLAIM_ACCOUNT| 88 - SLAB_PANIC|SLAB_MEM_SPREAD), 87 + 0, SLAB_RECLAIM_ACCOUNT| 88 + SLAB_MEM_SPREAD, 89 89 gfs2_init_inode_once, NULL); 90 90 if (!gfs2_inode_cachep) 91 91 goto fail;
+28 -16
fs/gfs2/ops_super.c
··· 138 138 } 139 139 140 140 /** 141 - * gfs2_write_super - disk commit all incore transactions 142 - * @sb: the filesystem 141 + * gfs2_write_super 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 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 160 gfs2_log_flush(sb->s_fs_info, NULL); 161 + return 0; 151 162 } 152 163 153 164 /** ··· 463 452 } 464 453 465 454 struct super_operations gfs2_super_ops = { 466 - .alloc_inode = gfs2_alloc_inode, 467 - .destroy_inode = gfs2_destroy_inode, 468 - .write_inode = gfs2_write_inode, 469 - .delete_inode = gfs2_delete_inode, 470 - .put_super = gfs2_put_super, 471 - .write_super = gfs2_write_super, 472 - .write_super_lockfs = gfs2_write_super_lockfs, 473 - .unlockfs = gfs2_unlockfs, 474 - .statfs = gfs2_statfs, 475 - .remount_fs = gfs2_remount_fs, 476 - .clear_inode = gfs2_clear_inode, 477 - .show_options = gfs2_show_options, 455 + .alloc_inode = gfs2_alloc_inode, 456 + .destroy_inode = gfs2_destroy_inode, 457 + .write_inode = gfs2_write_inode, 458 + .delete_inode = gfs2_delete_inode, 459 + .put_super = gfs2_put_super, 460 + .write_super = gfs2_write_super, 461 + .sync_fs = gfs2_sync_fs, 462 + .write_super_lockfs = gfs2_write_super_lockfs, 463 + .unlockfs = gfs2_unlockfs, 464 + .statfs = gfs2_statfs, 465 + .remount_fs = gfs2_remount_fs, 466 + .clear_inode = gfs2_clear_inode, 467 + .show_options = gfs2_show_options, 478 468 }; 479 469