From d71e0f7b788134823c1c69494ac6218919bf07fb Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 30 Jun 2005 02:59:04 -0700 Subject: [PATCH] --- yaml --- r: 4006 b: refs/heads/master c: ba03bda81e160b2724451074cdcb597d14f7d7e0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/freevxfs/vxfs_fshead.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 4282e4b77e9b..0b5c00166514 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f220ab2a5162c35cca6993ea473937cfc962fce4 +refs/heads/master: ba03bda81e160b2724451074cdcb597d14f7d7e0 diff --git a/trunk/fs/freevxfs/vxfs_fshead.c b/trunk/fs/freevxfs/vxfs_fshead.c index 05b19f70bf97..6dee109aeea4 100644 --- a/trunk/fs/freevxfs/vxfs_fshead.c +++ b/trunk/fs/freevxfs/vxfs_fshead.c @@ -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; }