]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Release preallocation on last writeable close
authorJan Kara <jack@suse.cz>
Wed, 28 Jan 2015 07:38:20 +0000 (08:38 +0100)
committerJan Kara <jack@suse.cz>
Wed, 28 Jan 2015 08:00:40 +0000 (09:00 +0100)
commitadd7920d13cb70aab3321e2dfcbf5905985f7ce5
tree4364a7689dd8977d7cdb2158a2133dead4603773
parent4fb4eac16a9ce90875ae238cce74e0fd0f27549d
udf: Release preallocation on last writeable close

Commit ccd91fe26472 "udf: Fix race between write(2) and close(2)"
changed the condition when preallocation is released. The idea was that
we don't want to release the preallocation for an inode on close when
there are other writeable file descriptors for the inode. However the
condition was written in the opposite way so we released preallocation
only if there were other writeable file descriptors. Fix the problem by
changing the condition properly.

CC: stable@vger.kernel.org
Fixes: ccd91fe2647284d148ec8986813c141ab2547e62
Reported-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/file.c