]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Ensure rindex is uptodate for fallocate
authorBob Peterson <rpeterso@redhat.com>
Fri, 17 Feb 2012 14:15:52 +0000 (09:15 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 28 Feb 2012 09:48:30 +0000 (09:48 +0000)
commit94d59abb1ef0dc0839464630f1c41cfed91a49f6
tree65210fa95c01ca3c6b44a92bea2068887e6a7fcf
parent22c2a83654a6e13089b2972ab3575b1f3fc1ad5e
GFS2: Ensure rindex is uptodate for fallocate

This patch fixes a problem whereby gfs2_grow was failing and causing GFS2
to assert. The problem was that when GFS2's fallocate operation tried to
acquire an "allocation" it made sure the rindex was up to date, and if not,
it called gfs2_rindex_update. However, if the file being fallocated was
the rindex itself, it was already locked at that point. By calling
gfs2_rindex_update at an earlier point in time, we bring rindex up to date
and thereby avoid trying to lock it when the "allocation" is acquired.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/file.c