git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79835a7
)
leases: fix write-open/read-lease race
author
J. Bruce Fields
<bfields@redhat.com>
Wed, 21 Sep 2011 14:58:13 +0000
(10:58 -0400)
committer
root
<root@serles.lst.de>
Fri, 28 Oct 2011 12:59:00 +0000
(14:59 +0200)
In setlease, we use i_writecount to decide whether we can give out a
read lease.
In open, we break leases before incrementing i_writecount.
There is therefore a window between the break lease and the i_writecount
increment when setlease could add a new read lease.
This would leave us with a simultaneous write open and read lease, which
shouldn't happen.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/namei.c
patch
|
blob
|
history
fs/open.c
patch
|
blob
|
history
diff --cc
fs/namei.c
Simple merge
diff --cc
fs/open.c
Simple merge