static void inode_go_drop_th(struct gfs2_glock *gl)
{
- printk(KERN_INFO "drop th %p\n", gl->gl_object);
gfs2_pte_inval(gl);
gfs2_glock_drop_th(gl);
}
if (test_bit(GLF_DIRTY, &gl->gl_flags)) {
if (meta && data) {
- printk(KERN_INFO "sync all\n");
gfs2_page_sync(gl, flags | DIO_START);
gfs2_log_flush(gl->gl_sbd, gl);
gfs2_meta_sync(gl, flags | DIO_START | DIO_WAIT);
return 0;
if (ip->i_vn != gl->gl_vn) {
- printk(KERN_INFO "refresh inode %p\n", &ip->i_inode);
error = gfs2_inode_refresh(ip);
if (error)
return error;
} else
gfs2_log_unlock(sdp);
- kfree(bd1);
+ kmem_cache_free(gfs2_bufdata_cachep, bd1);
}
/* We've removed all the ordered write bufs here, so only jdata left */
struct gfs2_sbd *sdp = GFS2_SB(dir);
struct gfs2_holder ghs[2];
struct inode *inode;
- int new = 1;
gfs2_holder_init(dip->i_gl, 0, 0, ghs);
gfs2_quota_unlock(dip);
gfs2_alloc_put(dip);
gfs2_glock_dq_uninit_m(2, ghs);
+ mark_inode_dirty(inode);
break;
} else if (PTR_ERR(inode) != -EEXIST ||
(nd->intent.open.flags & O_EXCL)) {
inode = gfs2_lookupi(dir, &dentry->d_name, 0, nd);
if (inode) {
if (!IS_ERR(inode)) {
- new = 0;
gfs2_holder_uninit(ghs);
break;
} else {
}
d_instantiate(dentry, inode);
- if (new)
- mark_inode_dirty(inode);
return 0;
}
if (current->flags & PF_MEMALLOC)
return 0;
if (sync)
- gfs2_log_flush(ip->i_gl->gl_sbd, ip->i_gl);
+ gfs2_log_flush(GFS2_SB(inode), ip->i_gl);
}
return 0;
uint64_t junk = ip->i_di.di_size;
int error;
- printk(KERN_INFO "gfs2_ri_update inode=%p\n", inode);
-
if (do_div(junk, sizeof(struct gfs2_rindex))) {
gfs2_consist_inode(ip);
return -EIO;
clear_rgrpdi(sdp);
- printk(KERN_INFO "rgrps cleared\n");
-
file_ra_state_init(&ra_state, inode->i_mapping);
for (sdp->sd_rgrps = 0;; sdp->sd_rgrps++) {
loff_t pos = sdp->sd_rgrps * sizeof(struct gfs2_rindex);
- printk(KERN_INFO "reading rgrp %d\n", sdp->sd_rgrps);
error = gfs2_internal_read(ip, &ra_state, buf, &pos,
sizeof(struct gfs2_rindex));
if (!error)
list_add_tail(&rgd->rd_list_mru, &sdp->sd_rindex_mru_list);
gfs2_rindex_in(&rgd->rd_ri, buf);
- printk(KERN_INFO "compute bitstructs\n");
error = compute_bitstructs(rgd);
if (error)
goto fail;
- printk(KERN_INFO "gfs2_glock_get\n");
error = gfs2_glock_get(sdp, rgd->rd_ri.ri_addr,
&gfs2_rgrp_glops, CREATE, &rgd->rd_gl);
- printk(KERN_INFO "gfs2_glock_got one\n");
if (error)
goto fail;
rgd->rd_rg_vn = rgd->rd_gl->gl_vn - 1;
}
- printk(KERN_INFO "ok, finished\n");
sdp->sd_rindex_vn = ip->i_gl->gl_vn;
return 0;
fail:
- printk(KERN_INFO "fail\n");
clear_rgrpdi(sdp);
- printk(KERN_INFO "cleared rgrps\n");
return error;
}