]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
VFS: fix a race in lease-breaking during truncate
authordavid m. richter <richterd@citi.umich.edu>
Tue, 31 Jul 2007 07:39:12 +0000 (00:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:42 +0000 (15:39 -0700)
commit9700382c3c9ff3e673e587084d76eedb3ba88668
tree57ed58d87e765323692e463c8b7ee64f702dff0d
parent937472b00b666ecbf1464502f857ec63b024af72
VFS: fix a race in lease-breaking during truncate

It is possible that another process could acquire a new file lease right
after break_lease() is called during a truncate, but before lease-granting
is disabled by the subsequent get_write_access().  Merely switching the
order of the break_lease() and get_write_access() calls prevents this race.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/open.c