Fix bug recently introduced in MemFile::Lock()
Fix bug recently introduced in MemFile::Lock()

Summary: This bug fails DBTest.CheckLock

Test Plan: DBTest.CheckLock now passes with MEM_ENV=1.

Reviewers: rven, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D32451

Vaisman/rocksdb,ryneli/rocksdb,dkorolev/rocksdb,alihalabyah/rocksdb,vmx/rocksdb,facebook/rocksdb,facebook/rocksdb,wenduo/rocksdb,vashstorm/rocksdb,dkorolev/rocksdb,wskplho/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,tizzybec/rocksdb,JackLian/rocksdb,ylong/rocksdb,kaschaeffer/rocksdb,JoeWoo/rocksdb,virtdb/rocksdb,JohnPJenkins/rocksdb,norton/rocksdb,JackLian/rocksdb,lgscofield/rocksdb,zhangpng/rocksdb,vmx/rocksdb,caijieming-baidu/rocksdb,skunkwerks/rocksdb,mbarbon/rocksdb,wenduo/rocksdb,zhangpng/rocksdb,wskplho/rocksdb,fengshao0907/rocksdb,IMCG/RcoksDB,ylong/rocksdb,geraldoandradee/rocksdb,tsheasha/rocksdb,anagav/rocksdb,facebook/rocksdb,biddyweb/rocksdb,rDSN-Projects/rocksdb.replicated,ryneli/rocksdb,jalexanderqed/rocksdb,fengshao0907/rocksdb,bbiao/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,flabby/rocksdb,tizzybec/rocksdb,skunkwerks/rocksdb,fengshao0907/rocksdb,SunguckLee/RocksDB,wlqGit/rocksdb,geraldoandradee/rocksdb,wenduo/rocksdb,SunguckLee/RocksDB,flabby/rocksdb,makelivedotnet/rocksdb,zhangpng/rocksdb,makelivedotnet/rocksdb,lgscofield/rocksdb,vmx/rocksdb,rDSN-Projects/rocksdb.replicated,skunkwerks/rocksdb,makelivedotnet/rocksdb,mbarbon/rocksdb,biddyweb/rocksdb,amyvmiwei/rocksdb,JohnPJenkins/rocksdb,geraldoandradee/rocksdb,Vaisman/rocksdb,sorphi/rocksdb,JohnPJenkins/rocksdb,wat-ze-hex/rocksdb,wat-ze-hex/rocksdb,kaschaeffer/rocksdb,tizzybec/rocksdb,siddhartharay007/rocksdb,JackLian/rocksdb,tizzybec/rocksdb,siddhartharay007/rocksdb,anagav/rocksdb,OverlordQ/rocksdb,vmx/rocksdb,wskplho/rocksdb,mbarbon/rocksdb,temicai/rocksdb,alihalabyah/rocksdb,JohnPJenkins/rocksdb,jalexanderqed/rocksdb,hobinyoon/rocksdb,fengshao0907/rocksdb,facebook/rocksdb,jalexanderqed/rocksdb,wat-ze-hex/rocksdb,siddhartharay007/rocksdb,skunkwerks/rocksdb,siddhartharay007/rocksdb,makelivedotnet/rocksdb,temicai/rocksdb,Vaisman/rocksdb,rDSN-Projects/rocksdb.replicated,tsheasha/rocksdb,bbiao/rocksdb,NickCis/rocksdb,NickCis/rocksdb,hobinyoon/rocksdb,sorphi/rocksdb,anagav/rocksdb,Andymic/rocksdb,OverlordQ/rocksdb,tsheasha/rocksdb,RyanTech/rocksdb,JoeWoo/rocksdb,anagav/rocksdb,biddyweb/rocksdb,hobinyoon/rocksdb,wlqGit/rocksdb,tizzybec/rocksdb,caijieming-baidu/rocksdb,luckywhu/rocksdb,temicai/rocksdb,OverlordQ/rocksdb,luckywhu/rocksdb,ylong/rocksdb,vashstorm/rocksdb,Andymic/rocksdb,RyanTech/rocksdb,jalexanderqed/rocksdb,IMCG/RcoksDB,mbarbon/rocksdb,biddyweb/rocksdb,amyvmiwei/rocksdb,zhangpng/rocksdb,RyanTech/rocksdb,RyanTech/rocksdb,flabby/rocksdb,wskplho/rocksdb,norton/rocksdb,wlqGit/rocksdb,SunguckLee/RocksDB,geraldoandradee/rocksdb,Vaisman/rocksdb,makelivedotnet/rocksdb,mbarbon/rocksdb,caijieming-baidu/rocksdb,vmx/rocksdb,Applied-Duality/rocksdb,JohnPJenkins/rocksdb,fengshao0907/rocksdb,zhangpng/rocksdb,skunkwerks/rocksdb,tsheasha/rocksdb,SunguckLee/RocksDB,ylong/rocksdb,ryneli/rocksdb,anagav/rocksdb,mbarbon/rocksdb,alihalabyah/rocksdb,ylong/rocksdb,virtdb/rocksdb,geraldoandradee/rocksdb,sorphi/rocksdb,wenduo/rocksdb,Applied-Duality/rocksdb,OverlordQ/rocksdb,wat-ze-hex/rocksdb,Vaisman/rocksdb,JoeWoo/rocksdb,alihalabyah/rocksdb,Applied-Duality/rocksdb,tizzybec/rocksdb,jalexanderqed/rocksdb,dkorolev/rocksdb,tsheasha/rocksdb,wat-ze-hex/rocksdb,luckywhu/rocksdb,flabby/rocksdb,wat-ze-hex/rocksdb,fengshao0907/rocksdb,rDSN-Projects/rocksdb.replicated,hobinyoon/rocksdb,vashstorm/rocksdb,zhangpng/rocksdb,temicai/rocksdb,Applied-Duality/rocksdb,NickCis/rocksdb,IMCG/RcoksDB,anagav/rocksdb,sorphi/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,biddyweb/rocksdb,luckywhu/rocksdb,wskplho/rocksdb,skunkwerks/rocksdb,alihalabyah/rocksdb,OverlordQ/rocksdb,Andymic/rocksdb,Vaisman/rocksdb,wat-ze-hex/rocksdb,temicai/rocksdb,Andymic/rocksdb,RyanTech/rocksdb,kaschaeffer/rocksdb,rDSN-Projects/rocksdb.replicated,virtdb/rocksdb,caijieming-baidu/rocksdb,vashstorm/rocksdb,luckywhu/rocksdb,kaschaeffer/rocksdb,Andymic/rocksdb,JoeWoo/rocksdb,fengshao0907/rocksdb,norton/rocksdb,ylong/rocksdb,vashstorm/rocksdb,NickCis/rocksdb,wat-ze-hex/rocksdb,Vaisman/rocksdb,NickCis/rocksdb,sorphi/rocksdb,flabby/rocksdb,rDSN-Projects/rocksdb.replicated,norton/rocksdb,caijieming-baidu/rocksdb,norton/rocksdb,bbiao/rocksdb,bbiao/rocksdb,amyvmiwei/rocksdb,RyanTech/rocksdb,IMCG/RcoksDB,IMCG/RcoksDB,dkorolev/rocksdb,norton/rocksdb,biddyweb/rocksdb,JohnPJenkins/rocksdb,rDSN-Projects/rocksdb.replicated,SunguckLee/RocksDB,lgscofield/rocksdb,Applied-Duality/rocksdb,siddhartharay007/rocksdb,norton/rocksdb,OverlordQ/rocksdb,caijieming-baidu/rocksdb,jalexanderqed/rocksdb,wlqGit/rocksdb,sorphi/rocksdb,norton/rocksdb,zhangpng/rocksdb,wlqGit/rocksdb,temicai/rocksdb,alihalabyah/rocksdb,SunguckLee/RocksDB,lgscofield/rocksdb,wenduo/rocksdb,vashstorm/rocksdb,SunguckLee/RocksDB,dkorolev/rocksdb,vmx/rocksdb,virtdb/rocksdb,IMCG/RcoksDB,amyvmiwei/rocksdb,hobinyoon/rocksdb,hobinyoon/rocksdb,vmx/rocksdb,virtdb/rocksdb,alihalabyah/rocksdb,tizzybec/rocksdb,lgscofield/rocksdb,ryneli/rocksdb,luckywhu/rocksdb,temicai/rocksdb,wlqGit/rocksdb,wskplho/rocksdb,lgscofield/rocksdb,NickCis/rocksdb,siddhartharay007/rocksdb,lgscofield/rocksdb,kaschaeffer/rocksdb,vashstorm/rocksdb,geraldoandradee/rocksdb,JoeWoo/rocksdb,facebook/rocksdb,tsheasha/rocksdb,dkorolev/rocksdb,caijieming-baidu/rocksdb,Andymic/rocksdb,flabby/rocksdb,Andymic/rocksdb,ryneli/rocksdb,wlqGit/rocksdb,Andymic/rocksdb,NickCis/rocksdb,skunkwerks/rocksdb,kaschaeffer/rocksdb,Applied-Duality/rocksdb,sorphi/rocksdb,geraldoandradee/rocksdb,wenduo/rocksdb,ylong/rocksdb,amyvmiwei/rocksdb,wenduo/rocksdb,facebook/rocksdb,facebook/rocksdb,siddhartharay007/rocksdb,JackLian/rocksdb,amyvmiwei/rocksdb,anagav/rocksdb,luckywhu/rocksdb,tsheasha/rocksdb,virtdb/rocksdb,hobinyoon/rocksdb,flabby/rocksdb,virtdb/rocksdb,bbiao/rocksdb,JohnPJenkins/rocksdb,mbarbon/rocksdb,Applied-Duality/rocksdb,amyvmiwei/rocksdb,JoeWoo/rocksdb,JackLian/rocksdb,biddyweb/rocksdb,OverlordQ/rocksdb,bbiao/rocksdb,makelivedotnet/rocksdb,RyanTech/rocksdb,bbiao/rocksdb,IMCG/RcoksDB,wskplho/rocksdb,JackLian/rocksdb,facebook/rocksdb,kaschaeffer/rocksdb,makelivedotnet/rocksdb,wenduo/rocksdb,dkorolev/rocksdb,vmx/rocksdb,jalexanderqed/rocksdb,JackLian/rocksdb,JoeWoo/rocksdb