summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c
diff options
context:
space:
mode:
authorSteven Whitehouse2006-10-10 19:45:15 +0200
committerSteven Whitehouse2006-10-12 23:10:15 +0200
commitf5c54804d9e3bb23d8924af09d9ca1c8de9560b6 (patch)
tree34b1b098b93d41a796e3e528445fa3d87030808e /fs/gfs2/ops_address.c
parent[GFS2] Fix a size calculation error (diff)
downloadkernel-qcow2-linux-f5c54804d9e3bb23d8924af09d9ca1c8de9560b6.tar.gz
kernel-qcow2-linux-f5c54804d9e3bb23d8924af09d9ca1c8de9560b6.tar.xz
kernel-qcow2-linux-f5c54804d9e3bb23d8924af09d9ca1c8de9560b6.zip
[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 <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r--fs/gfs2/ops_address.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index bdf56cf66224..99c933762eb2 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -385,6 +385,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
goto out_unlock;
+ ip->i_alloc.al_requested = 0;
if (alloc_required) {
al = gfs2_alloc_get(ip);