Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[linux-3.10.git] / fs / gfs2 / super.c
index 867700a..bc73726 100644 (file)
@@ -1366,6 +1366,8 @@ static int gfs2_show_options(struct seq_file *s, struct dentry *root)
        val = sdp->sd_tune.gt_statfs_quantum;
        if (val != 30)
                seq_printf(s, ",statfs_quantum=%d", val);
+       else if (sdp->sd_tune.gt_statfs_slow)
+               seq_puts(s, ",statfs_quantum=0");
        val = sdp->sd_tune.gt_quota_quantum;
        if (val != 60)
                seq_printf(s, ",quota_quantum=%d", val);
@@ -1543,6 +1545,11 @@ static void gfs2_evict_inode(struct inode *inode)
 
 out_truncate:
        gfs2_log_flush(sdp, ip->i_gl);
+       if (test_bit(GLF_DIRTY, &ip->i_gl->gl_flags)) {
+               struct address_space *metamapping = gfs2_glock2aspace(ip->i_gl);
+               filemap_fdatawrite(metamapping);
+               filemap_fdatawait(metamapping);
+       }
        write_inode_now(inode, 1);
        gfs2_ail_flush(ip->i_gl, 0);
 
@@ -1557,7 +1564,7 @@ out_truncate:
 out_unlock:
        /* Error path for case 1 */
        if (gfs2_rs_active(ip->i_res))
-               gfs2_rs_deltree(ip->i_res);
+               gfs2_rs_deltree(ip, ip->i_res);
 
        if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags))
                gfs2_glock_dq(&ip->i_iopen_gh);