Fix uninitialised variable
PATCH 2/7 Fix uninitialised variable
Quoted 1 line
From
f5c54804d9e3bb23d8924af09d9ca1c8de9560b6Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Tue, 10 Oct 2006 13:45:15 -0400
Subject: [GFS2] Fix uninitialised variable
This fixes a bug where, in certain cases an uninitialised variable could cause a dereference of a NULL pointer in gfs2_commit_write(). Also a typo in a comment is fixed at the same time.
Signed-off-by Steven Whitehouse <[email protected]>
--- fs/gfs2/ops_address.c | 1 + fs/gfs2/rgrp.h | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
fs/gfs2/ops_address.c +1 -0
@@ -385,6 +385,7 @@ static int gfs2_prepare_write(struct fil goto out_unlock; + ip->i_alloc.al_requested =0 ;if (alloc_required) { al =gfs2_alloc_get (ip);
fs/gfs2/rgrp.h +1 -1
@@ -32,7 +32,7 @@ void gfs2_rgrp_repolish_clones(struct gfstruct gfs2_alloc *gfs2_alloc_get (struct gfs2_inode *ip);static inline void gfs2_alloc_put (struct gfs2_inode *ip) { -return ;/* Se we can see where ip->i_alloc is used */ +return ;/* So we can see where ip->i_alloc is used */ } int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
Signature · 1 line
1.4.1