]> git.karo-electronics.de Git - karo-tx-linux.git/commit
GFS2: Fix writing to non-page aligned gfs2_quota structures
authorAbhijith Das <adas@redhat.com>
Fri, 7 May 2010 21:50:18 +0000 (17:50 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 May 2011 22:55:11 +0000 (15:55 -0700)
commita03167aeee8e456241345b8d6d18b4a64f511a60
tree7deb82b0bd7248d9717be0e3b7a1e35fe37860b3
parent120011ea116c37f481a212f5c3d00e827777f1ee
GFS2: Fix writing to non-page aligned gfs2_quota structures

commit 7e619bc3e6252dc746f64ac3b486e784822e9533 upstream.

This is the upstream fix for this bug. This patch differs
from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
value field of the quota. In upstream quota code, we're
required to write the entire quota (88 bytes) which can be split
across a page boundary. We check for such quotas, and read/write
the two parts from/to the corresponding pages holding these parts.

With this patch, I don't see the bug anymore using the reproducer
in Red Hat bz 555754. I successfully ran a couple of simple tests/mounts/
umounts and it doesn't seem like this patch breaks anything else.

Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
[Backported to 2.6.32 by dann frazier <dannf@debian.org>]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/gfs2/quota.c