r17125: Drastic problems require drastic solutions. There's
authorJeremy Allison <jra@samba.org>
Wed, 19 Jul 2006 00:13:28 +0000 (00:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:13 +0000 (11:38 -0500)
commit8171c4c404e9f382880c65daa0232f89e560f399
tree9d4e09fb7d52b13c5a2a55f42f2a55e9b1f922e5
parentd7ec9f3cc0439e9e0f4c98988b14ae2155d931b9
r17125: Drastic problems require drastic solutions. There's
no way to get all the cases where kernel oplocks are
on and we can't open the file and get the correct
semantics (think about the open with truncate with
an attribute only open - we'd need a vfs change to
add the truncate(fname, len) call). So always drop
the share mode lock before doing any real fd opens and
then re-acquire it afterwards. We're already dealing
with the race in the create case, and we deal with
any other races in the same way. Volker, please
examine *carefully* :-). This should fix the problems
people reported with kernel oplocks being on.
Jeremy.
source/smbd/open.c
source/smbd/posix_acls.c