]> err.no Git - linux-2.6/blobdiff - fs/freevxfs/vxfs_fshead.c
[PATCH] pipe: remove redundant fifo_poll abstraction
[linux-2.6] / fs / freevxfs / vxfs_fshead.c
index 05b19f70bf97efdd47872566e15e6638c41aa1b7..6dee109aeea406d853ea7d3dfc4eea41294d98d2 100644 (file)
@@ -78,17 +78,18 @@ vxfs_getfsh(struct inode *ip, int which)
        struct buffer_head              *bp;
 
        bp = vxfs_bread(ip, which);
-       if (buffer_mapped(bp)) {
+       if (bp) {
                struct vxfs_fsh         *fhp;
 
-               if (!(fhp = kmalloc(sizeof(*fhp), SLAB_KERNEL)))
-                       return NULL;
+               if (!(fhp = kmalloc(sizeof(*fhp), GFP_KERNEL)))
+                       goto out;
                memcpy(fhp, bp->b_data, sizeof(*fhp));
 
-               brelse(bp);
+               put_bh(bp);
                return (fhp);
        }
-
+out:
+       brelse(bp);
        return NULL;
 }