diff options
Diffstat (limited to 'fs/freevxfs/vxfs_fshead.c')
-rw-r--r-- | fs/freevxfs/vxfs_fshead.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c index 05b19f70bf97..6dee109aeea4 100644 --- a/fs/freevxfs/vxfs_fshead.c +++ b/fs/freevxfs/vxfs_fshead.c | |||
@@ -78,17 +78,18 @@ vxfs_getfsh(struct inode *ip, int which) | |||
78 | struct buffer_head *bp; | 78 | struct buffer_head *bp; |
79 | 79 | ||
80 | bp = vxfs_bread(ip, which); | 80 | bp = vxfs_bread(ip, which); |
81 | if (buffer_mapped(bp)) { | 81 | if (bp) { |
82 | struct vxfs_fsh *fhp; | 82 | struct vxfs_fsh *fhp; |
83 | 83 | ||
84 | if (!(fhp = kmalloc(sizeof(*fhp), SLAB_KERNEL))) | 84 | if (!(fhp = kmalloc(sizeof(*fhp), GFP_KERNEL))) |
85 | return NULL; | 85 | goto out; |
86 | memcpy(fhp, bp->b_data, sizeof(*fhp)); | 86 | memcpy(fhp, bp->b_data, sizeof(*fhp)); |
87 | 87 | ||
88 | brelse(bp); | 88 | put_bh(bp); |
89 | return (fhp); | 89 | return (fhp); |
90 | } | 90 | } |
91 | 91 | out: | |
92 | brelse(bp); | ||
92 | return NULL; | 93 | return NULL; |
93 | } | 94 | } |
94 | 95 | ||