diff options
| author | J. Bruce Fields <[email protected]> | 2011-09-21 14:58:13 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2011-10-28 12:59:00 +0000 |
| commit | f3c7691e8d30d88899b514675c7c86d19057b5fd (patch) | |
| tree | 0065bcc05b19a99d8785ce523f992a48fe573e79 /lib/fault-inject.c | |
| parent | nfs: drop unnecessary locking in llseek (diff) | |
| download | kernel-f3c7691e8d30d88899b514675c7c86d19057b5fd.tar.gz kernel-f3c7691e8d30d88899b514675c7c86d19057b5fd.zip | |
leases: fix write-open/read-lease race
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions
