Searched hist:f3c7691e (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/fs/ |
H A D | open.c | f3c7691e Wed Sep 21 09:58:13 CDT 2011 J. Bruce Fields <bfields@redhat.com> 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 <bfields@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> f3c7691e Wed Sep 21 09:58:13 CDT 2011 J. Bruce Fields <bfields@redhat.com> 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 <bfields@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
|
H A D | namei.c | f3c7691e Wed Sep 21 09:58:13 CDT 2011 J. Bruce Fields <bfields@redhat.com> 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 <bfields@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> f3c7691e Wed Sep 21 09:58:13 CDT 2011 J. Bruce Fields <bfields@redhat.com> 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 <bfields@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
|