]> err.no Git - linux-2.6/blobdiff - fs/gfs2/meta_io.c
x86: don't return invalid pointers from node_to_cpumask()
[linux-2.6] / fs / gfs2 / meta_io.c
index 4b1aced9023d8fead3e9c48f66b4884a61edc113..78d75f892f82e198db720fe53c57fe49780dade7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
- * Copyright (C) 2004-2006 Red Hat, Inc.  All rights reserved.
+ * Copyright (C) 2004-2008 Red Hat, Inc.  All rights reserved.
  *
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
@@ -69,13 +69,15 @@ static const struct address_space_operations aspace_aops = {
 struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp)
 {
        struct inode *aspace;
+       struct gfs2_inode *ip;
 
        aspace = new_inode(sdp->sd_vfs);
        if (aspace) {
                mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS);
                aspace->i_mapping->a_ops = &aspace_aops;
                aspace->i_size = ~0ULL;
-               aspace->i_private = NULL;
+               ip = GFS2_I(aspace);
+               clear_bit(GIF_USER, &ip->i_flags);
                insert_inode_hash(aspace);
        }
        return aspace;
@@ -222,13 +224,14 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
                   struct buffer_head **bhp)
 {
        *bhp = getbuf(gl, blkno, CREATE);
-       if (!buffer_uptodate(*bhp))
+       if (!buffer_uptodate(*bhp)) {
                ll_rw_block(READ_META, 1, bhp);
-       if (flags & DIO_WAIT) {
-               int error = gfs2_meta_wait(gl->gl_sbd, *bhp);
-               if (error) {
-                       brelse(*bhp);
-                       return error;
+               if (flags & DIO_WAIT) {
+                       int error = gfs2_meta_wait(gl->gl_sbd, *bhp);
+                       if (error) {
+                               brelse(*bhp);
+                               return error;
+                       }
                }
        }
 
@@ -283,7 +286,7 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh,
                return;
        }
 
-       bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL),
+       bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL);
        bd->bd_bh = bh;
        bd->bd_gl = gl;